aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2009-07-18Enhance testing of overriding exception specs for inaccessible base exceptions.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Fix a comment.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Introduce a redecl_iterator in Decl class, so that we can do a "iterate over ↵Argyrios Kyrtzidis
all declarations of the same decl" without knowing the exact type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Introduce the Redeclarable template class, which serves as a base type ↵Argyrios Kyrtzidis
defining the common interface for Decls that can be redeclared. Make FunctionDecl and VarDecl use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Remove StmtLocResolver::VisitObjCIvarRefExpr, it was only there to avoid ↵Argyrios Kyrtzidis
returning an implicit 'self' instead of the ivar. Since implicit 'self' no longer has a source location, it's not needed. (plus we also want to check for a 'self' that is visible in source code) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Don't add a SourceLocation for 'self' if it does not actually appears in the ↵Argyrios Kyrtzidis
source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Replace stmt visitors with the fall back method.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Fix crash in StoreManager::NewCastRegion() when handling casts from 'id' (or ↵Ted Kremenek
whatever) to a BlockPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Return CodeTextRegions for BlockPointerTypes in addition to ↵Ted Kremenek
FunctionPointerTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Fix some fallout from CFGBuilder restructuring: all expressions that we ↵Ted Kremenek
explicitly handle have the possibility to be block-level expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76277 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.Argyrios Kyrtzidis
Their usefulness is questionable since redecl_iterator was introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its ↵Argyrios Kyrtzidis
place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Move the functionality of ASTContext::getCanonicalDecl(), into a virtual ↵Argyrios Kyrtzidis
method Decl::getCanonicalDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Resolve a location that is inside an ObjCMethodDecl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Search through all Decls that are DeclContexts.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Location should be passed to setLocEnd() not to setAtEndLoc() which belongs ↵Argyrios Kyrtzidis
to ObjCContainerDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17fix objc codegen to not have its own list of things that eventually get into ↵Chris Lattner
llvm.used, just populate CGM's list directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Fix caching bug revealed by analyzing ClamAV using RegionStore.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Fix possible null dereference in CFG construction.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Restructure CFG builder to have just one visitor path instead of two. The resultTed Kremenek
is an algorithm that is much easier to understand and slightly more efficient. Thanks to Mike Stump for our discussions on the CFGBuilder and his comments that helped prompt this long needed cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Move WalkAST logic for 'ChooseExpr' to 'VisitChooseExpr'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Move WalkAST logic for 'ConditionalOperator' into 'VisitConditionalOperator'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Remove stale comments.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek
until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17clean up this code, add the fixme back.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17objc methods can't be an operand to callexpr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Rename Entity::getName() to Entity::getPrintableName() to make its purposeZhongxing Xu
more obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17As suggested by Argyrios, revert r76159 and make "FindImmediateParent" Zhongxing Xu
a public static method of ASTLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Refactor code into a new CallExpr::getDirectCallee() method. Simplify someZhongxing Xu
code with the new method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17CallGraph: add a bunch of stmt visitors.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Relax the assertion in ASTLocation's ctor: if the decl is not the immediateZhongxing Xu
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17CallGraph:Zhongxing Xu
- add IfStmt visitor. - print information only when a function has callee. Otherwise its ASTContext map is NULL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Fixup indentation of rest of switch statement to match llvm codingMike Stump
conventions. Also reflowed comments and removed spaces at end of lines and fixed up 80 col violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17If we are not doing a Debug build, no need for the debugging print methods.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Check whether the IdentifierInfo is null, before using it.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Make noreturn functions alter the CFG.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Fix unused variable warnings (with -Asserts)Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16ir-gen for --/++ operators of objc object pointersFariborz Jahanian
in 32bit abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Hook in s390x stuff into clangAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Move the source-level CFG from libAST to libAnalysis.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Diagnose ++/-- op on objc pointers inFariborz Jahanian
nonfragile abi, instead of crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16use CreateRuntimeVariable to get __CFConstantStringClassReferenceChris Lattner
instead of doing it manually (which might end up getting auto-renamed), fixing a FIXME. rdar://7065446 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Cleanup a couple loops and improve a comment (based on feedback from Fariborz).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Remove ASTContext::isObjCObjectPointerType().Steve Naroff
Convert all clients to use the new predicate on Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8