summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rename Entity::getName() to Entity::getPrintableName() to make its purposeZhongxing Xu2009-07-172-5/+6
| | | | | | more obvious. llvm-svn: 76167
* As suggested by Argyrios, revert r76159 and make "FindImmediateParent" Zhongxing Xu2009-07-172-12/+5
| | | | | | a public static method of ASTLocation. llvm-svn: 76166
* Refactor code into a new CallExpr::getDirectCallee() method. Simplify someZhongxing Xu2009-07-173-23/+17
| | | | | | code with the new method. llvm-svn: 76164
* CallGraph: add a bunch of stmt visitors.Zhongxing Xu2009-07-171-6/+20
| | | | llvm-svn: 76161
* Relax the assertion in ASTLocation's ctor: if the decl is not the immediateZhongxing Xu2009-07-171-0/+10
| | | | | | | | | parent of the stmt, find the immediate parent for the stmt. This is because sometimes we cannot get the immediate decl of the stmt when creating the ASTLocation. We can only get a parent of the stmt. llvm-svn: 76159
* CallGraph:Zhongxing Xu2009-07-171-6/+12
| | | | | | | | - add IfStmt visitor. - print information only when a function has callee. Otherwise its ASTContext map is NULL. llvm-svn: 76156
* Fixup indentation of rest of switch statement to match llvm codingMike Stump2009-07-171-690/+667
| | | | | | | conventions. Also reflowed comments and removed spaces at end of lines and fixed up 80 col violations. llvm-svn: 76140
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-1736-244/+154
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* If we are not doing a Debug build, no need for the debugging print methods.Argyrios Kyrtzidis2009-07-171-2/+6
| | | | llvm-svn: 76138
* Check whether the IdentifierInfo is null, before using it.Argyrios Kyrtzidis2009-07-171-0/+3
| | | | llvm-svn: 76136
* Make noreturn functions alter the CFG.Mike Stump2009-07-171-4/+34
| | | | llvm-svn: 76133
* Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().Ted Kremenek2009-07-179-40/+22
| | | | llvm-svn: 76132
* Fix unused variable warnings (with -Asserts)Daniel Dunbar2009-07-161-0/+1
| | | | llvm-svn: 76112
* ir-gen for --/++ operators of objc object pointersFariborz Jahanian2009-07-161-1/+19
| | | | | | in 32bit abi. llvm-svn: 76109
* Hook in s390x stuff into clangAnton Korobeynikov2009-07-162-0/+146
| | | | llvm-svn: 76099
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-1631-223/+187
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Move the source-level CFG from libAST to libAnalysis.Ted Kremenek2009-07-166-5/+5
| | | | llvm-svn: 76092
* Update for LLVM API change.Owen Anderson2009-07-161-5/+5
| | | | llvm-svn: 76090
* Diagnose ++/-- op on objc pointers inFariborz Jahanian2009-07-161-0/+6
| | | | | | nonfragile abi, instead of crashing. llvm-svn: 76088
* use CreateRuntimeVariable to get __CFConstantStringClassReferenceChris Lattner2009-07-161-11/+6
| | | | | | | instead of doing it manually (which might end up getting auto-renamed), fixing a FIXME. rdar://7065446 llvm-svn: 76079
* Cleanup a couple loops and improve a comment (based on feedback from Fariborz).Steve Naroff2009-07-161-3/+7
| | | | llvm-svn: 76078
* Remove ASTContext::isObjCObjectPointerType().Steve Naroff2009-07-1614-64/+27
| | | | | | Convert all clients to use the new predicate on Type. llvm-svn: 76076
* codegen string literals using private linkage now like llvm-gcc, eliminatingChris Lattner2009-07-162-23/+17
| | | | | | some target hooks. llvm-svn: 75895
* Update CMake file.Ted Kremenek2009-07-161-0/+1
| | | | llvm-svn: 75885
* Move RegionStoreManager over to using newTed Kremenek2009-07-163-66/+34
| | | | | | | | ValueManager::makeArrayIndex()/convertArrayIndex() methods. This handles yet another crash case when reasoning about array indices of different bitwidth and signedness. llvm-svn: 75884
* Two changes:Ted Kremenek2009-07-162-5/+16
| | | | | | | | | | | | | (1) Moved the SValuator object from GRExprEngine to ValueManager. This allows ValueManager to use the SValuator when creating SVals. (2) Added ValueManager::makeArrayIndex() and ValueManager::convertToArrayIndex(), two SVal creation methods that will help RegionStoreManager always have a consistent set of SVals with the same integer size and type when reasoning about array indices. llvm-svn: 75882
* Generate error on declaration containing 'static' and '__attribute__((weak))'Fariborz Jahanian2009-07-161-0/+13
| | | | | | Patch by Ryan Flynn llvm-svn: 75879
* Commit the initial implementation of call graph building.Zhongxing Xu2009-07-161-0/+121
| | | | llvm-svn: 75873
* Avoid crashing for the enclosed test case.Steve Naroff2009-07-161-47/+53
| | | | | | This is fallout from the recent ObjCObjectPointerType rework. I'll work on fixing this tomorrow. llvm-svn: 75870
* Update for LLVM API change.Owen Anderson2009-07-161-1/+1
| | | | llvm-svn: 75869
* Use utility method to create 0-index into ElementRegion.Ted Kremenek2009-07-161-2/+2
| | | | llvm-svn: 75865
* Fixed a stinko which caused an ast-print test failure.Fariborz Jahanian2009-07-151-2/+0
| | | | llvm-svn: 75861
* Handle some more fallout with the conversion of using PointerType forTed Kremenek2009-07-151-2/+2
| | | | | | | | | | | | | | | Objective-C pointers to using ObjCObjectPointerType. Now the checking for 'attribute ((nonnull))' in Sema doesn't emit an error when trying to apply that attribute to a parameter that is an Objective-C pointer (this is a regression). To prevent this regression from occuring in the future, the 'nonnull.c' test was moved to test/SemaObjC and renamed 'nonnull.m'. I also enhanced the tests to show that function calls involved a NULL Objective-C pointer constant does not trigger a warning. This is consistent with GCC, but should likely be fixed. llvm-svn: 75856
* #ifdef'ed out -ast-print of destructors which causedFariborz Jahanian2009-07-151-0/+2
| | | | | | a test failure, until figuring out what caused the failure. llvm-svn: 75855
* Added ASTs to destructor decl AST for default destruction of object'sFariborz Jahanian2009-07-156-7/+84
| | | | | | base/members. llvm-svn: 75849
* Fix <rdar://problem/7062158> by having BasicStoreManager model values for ↵Ted Kremenek2009-07-151-4/+0
| | | | | | 'static' global variables. llvm-svn: 75844
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-157-13/+13
| | | | llvm-svn: 75832
* Reapply r75764: [llvm up] Switch to using the new TargetRegistryDaniel Dunbar2009-07-151-5/+5
| | | | llvm-svn: 75821
* Revert r75764 "[llvm up] Switch to using the new TargetRegistry" to fix build.Argyrios Kyrtzidis2009-07-151-5/+5
| | | | llvm-svn: 75814
* Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say ↵Steve Naroff2009-07-159-84/+74
| | | | | | | | | | | | pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. llvm-svn: 75808
* Update for raw_fd_ostream API changes. raw_fd_ostream now has aDan Gohman2009-07-154-3/+6
| | | | | | | Force flag to control whether the case of opening an existing file is considered an error. llvm-svn: 75802
* [llvm up] Switch to using the new TargetRegistry.Daniel Dunbar2009-07-151-5/+5
| | | | llvm-svn: 75764
* Delete extra whitespaces.Zhongxing Xu2009-07-151-1/+1
| | | | llvm-svn: 75761
* rewrite the logic to make it follow the comments more closely.Zhongxing Xu2009-07-151-1/+2
| | | | llvm-svn: 75750
* Enhance RegionStore's reasoning about Objective-C ivars. More testing to ↵Ted Kremenek2009-07-151-16/+40
| | | | | | follow. llvm-svn: 75748
* Use utility method.Zhongxing Xu2009-07-151-1/+1
| | | | llvm-svn: 75745
* Add getName() method to Entity.Zhongxing Xu2009-07-151-0/+7
| | | | llvm-svn: 75740
* Relax assertion.Ted Kremenek2009-07-151-1/+2
| | | | llvm-svn: 75738
* More test cases revealed that the logic in StoreManager::InvalidateRegion() ↵Ted Kremenek2009-07-152-10/+34
| | | | | | | | | | | | | | | | | needs more finesse when handling the invalidation of pointers. Pointers that were invalidated as integers could later cause problems for clients using them as pointers. It is easier for us to model a symbolic value as a pointer rather than modeling a non-symbolic value as a pointer. This patch causes: - StoreManager::InvalidateRegion() to not used the casted type of a region if it would cause a pointer type to be invalidated as a non-pointer type. - Pushes RegionStore::RetrieveElement() further by handling retrievals from symbolic arrays that have been invalidated. This uses the new SymbolDerived construct that was recently introduced. The result is that the failing test in misc-ps-region-store-x86_64.m now passes. Both misc-ps-region-store-x86_64.m and misc-ps-region-store-i386.m contain a test case that motivated this change. llvm-svn: 75730
* Introduced the notion of a "derived symbol" using the class SymbolDerived.Ted Kremenek2009-07-152-0/+44
| | | | | | | | SymbolDerived allows us to model symbolic values that are related to other symbols via a region hierarchy. For example, SymbolDerived can be used to model individual values of a symbolic array. llvm-svn: 75728
OpenPOWER on IntegriCloud