summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', ↵Ted Kremenek2009-07-135-63/+43
| | | | | | and implementing operator<< support for llvm::raw_ostream. llvm-svn: 75560
* When pretty-printing symbolic regions, use '{' ... '}' to indicate the ↵Ted Kremenek2009-07-131-1/+1
| | | | | | symbol used for the region (makes it easier to read for nested regions). llvm-svn: 75550
* Fixes a minor bug in pretty printing of ctor defs.Fariborz Jahanian2009-07-131-3/+2
| | | | llvm-svn: 75549
* Change pretty-printing API for SymExprs and MemRegions to use a naming ↵Ted Kremenek2009-07-133-49/+33
| | | | | | convention and style similar to other elements in Clang. llvm-svn: 75548
* Enhance SimpleSValuator::EvalBinOpNN to recognize the trivial caseTed Kremenek2009-07-131-1/+20
| | | | | | | | | | | | where we are comparing a symbolic value against itself, regardless of the nature of that symbolic value. This enhancement identified a case where RegionStoreManager is not correctly symbolicating the values of the pointees of parameters. The failing test is now in 'test/Analysis/misc-ps-region-store.m', with that test file now (temporarily) marked XFAIL. llvm-svn: 75521
* Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bugDaniel Dunbar2009-07-131-1/+5
| | | | | | in array value-initialization. llvm-svn: 75518
* There is no need to value initialize this array.Daniel Dunbar2009-07-131-1/+1
| | | | llvm-svn: 75517
* Remove superfluous call to getAsPointerType()...Steve Naroff2009-07-131-2/+2
| | | | llvm-svn: 75509
* Sema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and ↵Steve Naroff2009-07-131-15/+12
| | | | | | OPT variables. llvm-svn: 75505
* add netbsd support, patch by Krister Kalfridsson!Chris Lattner2009-07-131-0/+23
| | | | llvm-svn: 75492
* Added pretty-printing support for constructor definition.Fariborz Jahanian2009-07-131-1/+41
| | | | llvm-svn: 75487
* - Improve comment for Type::getPointeeType().Steve Naroff2009-07-131-4/+0
| | | | | | | - Remove a couple redundant casts/returns. - Fix 80 column violations for all getAsStringInternal() methods. llvm-svn: 75485
* Fix 5 issues from Chris's feedback on ↵Steve Naroff2009-07-134-17/+5
| | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=75314. Still more to come...just wanted to get the no-brainers out of the way. llvm-svn: 75477
* Update debug info type cache after fwd decl is replaced by real decl.Devang Patel2009-07-131-2/+6
| | | | llvm-svn: 75473
* Fix comment.Devang Patel2009-07-131-1/+1
| | | | llvm-svn: 75471
* Update for LLVM API change.Owen Anderson2009-07-1315-82/+97
| | | | llvm-svn: 75446
* minor cleanups, reduce nesting of if's with early return.Chris Lattner2009-07-131-88/+110
| | | | llvm-svn: 75442
* fix file headers.Chris Lattner2009-07-124-4/+4
| | | | llvm-svn: 75437
* add push/pop semantics for diagnostics. Patch by Louis Gerbarg!Chris Lattner2009-07-122-9/+52
| | | | llvm-svn: 75431
* Fix type conversion of ObjCObjectPointerType.Daniel Dunbar2009-07-111-6/+7
| | | | | | | - Previous code was based on a misunderstanding (on my part) of the type representation. llvm-svn: 75385
* Generate correct prototype for objc_enumerationMutation.Daniel Dunbar2009-07-111-4/+7
| | | | | | - This was a latent bug exposed by the recent objc type changes. llvm-svn: 75383
* Fix breakage on Windows, cannot redeclare loop variable i in the immediate ↵Alisdair Meredith2009-07-111-4/+4
| | | | | | scope of loop. Rename variable to j. llvm-svn: 75365
* Handle insidious corner case exposed by RegionStoreManager when handling ↵Ted Kremenek2009-07-111-0/+13
| | | | | | | | void* values that are bound to symbolic regions and then treated like integers. llvm-svn: 75356
* Restructure RegionStoreManager::EvalBinOp() as a switch dispatch over differentTed Kremenek2009-07-111-33/+59
| | | | | | | MemRegion kinds. This allows the compiler to identify what MemRegions we don't handle for pointer arithmetic. llvm-svn: 75326
* Fix typo (found by gcc warning).Eli Friedman2009-07-111-1/+1
| | | | llvm-svn: 75325
* Implement more of C++0x 'auto'. A variable with an auto type specifier must ↵Anders Carlsson2009-07-114-4/+15
| | | | | | have an initializer. Also, move some tests around to match the C++0x draft better. llvm-svn: 75322
* Fix warning when compiling with optimizations:Ted Kremenek2009-07-111-2/+2
| | | | | | | | | warning: ‘OPT’ may be used uninitialized in this function Now OPT is initialized to NULL. I'm not certain if this is the correct fix; others please review. llvm-svn: 75321
* Remove some unused code from an experiment that I didn't like.Anders Carlsson2009-07-102-52/+0
| | | | llvm-svn: 75315
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-1030-671/+764
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Restructure RegionStoreManager::getSizeInElements() to use a switch statementTed Kremenek2009-07-101-52/+67
| | | | | | | over the types of MemRegions. This allows the compiler to warn us which regions are not handled, and also is a little faster. llvm-svn: 75304
* Fix type of 'this' and add a decltype test.Anders Carlsson2009-07-101-1/+1
| | | | llvm-svn: 75291
* Revert r75281 and simply remove the assertion in NewCastRegion thatTed Kremenek2009-07-101-25/+3
| | | | | | | | CodeTextRegions can only be casted to FunctionPointer or BlockPointerTypes. This simply isn't true. We can handle bogus operations on CodeTextRegions (e.g, an array access) elsewhere. llvm-svn: 75285
* Fix crash in StoreManager::NewCastRegion regarding handling casts to void*,Ted Kremenek2009-07-101-3/+24
| | | | | | void**, void***, etc. Such casts should just pass the region through. llvm-svn: 75281
* Patch to build list of inherited virtual base classes Fariborz Jahanian2009-07-102-5/+81
| | | | | | | | in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. llvm-svn: 75270
* Fix a problem that Eli noticed, and that Doug helped me fix.Anders Carlsson2009-07-103-8/+11
| | | | llvm-svn: 75265
* Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' ↵Ted Kremenek2009-07-101-4/+4
| | | | | | to hopefully resolve template lookup ambiguities on some compilers. llvm-svn: 75253
* Simplify a bit by using functions instead of checking enum values. No ↵Argyrios Kyrtzidis2009-07-101-15/+30
| | | | | | functionality change. llvm-svn: 75221
* Switch BasicStoreManager to use the new CastRegion implementation by default,Ted Kremenek2009-07-101-3/+3
| | | | | | | | and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with '-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation around for a little while for regression testing. llvm-svn: 75209
* don't crash if class is using itself as its super class.Fariborz Jahanian2009-07-091-36/+42
| | | | llvm-svn: 75178
* Fix another decltype crash.Anders Carlsson2009-07-091-1/+1
| | | | llvm-svn: 75175
* Sema check on out of order object initialization ofFariborz Jahanian2009-07-091-1/+68
| | | | | | class object's base and members under -Wreorder flag. llvm-svn: 75168
* Use getDeclName in DefineImplicitOverloadedAssign as well.Anders Carlsson2009-07-091-4/+4
| | | | llvm-svn: 75152
* Pass the DeclName to the diagnostic builder so that member names will be ↵Anders Carlsson2009-07-091-2/+2
| | | | | | quoted correctly. llvm-svn: 75150
* Add test for C++ [over.over.]p1, the contexts in which one can take the ↵Douglas Gregor2009-07-091-1/+1
| | | | | | address of an overloaded function. llvm-svn: 75146
* Remove dead code.Zhongxing Xu2009-07-091-1/+0
| | | | llvm-svn: 75127
* Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can ↵Anders Carlsson2009-07-092-2/+3
| | | | | | pass it when instantiating the expr. Fixes another member pointer bug. llvm-svn: 75075
* Implement the simple form of overload resolution used when taking theDouglas Gregor2009-07-081-11/+62
| | | | | | | address of an overloaded function (which may involve both functions and function templates). llvm-svn: 75069
* It's not allowed to form member pointers to members that have reference ↵Anders Carlsson2009-07-081-2/+10
| | | | | | type. Add a test for this and the rest of [dcl.mptr]p3. llvm-svn: 75054
* Implement template argument deduction when taking the address of aDouglas Gregor2009-07-085-142/+371
| | | | | | | | function template. Most of the change here is in factoring out the common bits used for template argument deduction from a function call and when taking the address of a function template. llvm-svn: 75044
* Update for IRBuilder API change.Owen Anderson2009-07-082-1/+2
| | | | llvm-svn: 75041
OpenPOWER on IntegriCloud