diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-07-02 19:27:51 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-07-02 19:27:51 +0000 |
commit | 7ab0182e33eee81dfc884e9cf95863bcaf30bab0 (patch) | |
tree | 4b90d6b3456902c203dbb741b2eac661d7ffa925 /clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | 2995349f3ea4ac46a864fdd3e822ea62a3847961 (diff) | |
download | bcm5719-llvm-7ab0182e33eee81dfc884e9cf95863bcaf30bab0.tar.gz bcm5719-llvm-7ab0182e33eee81dfc884e9cf95863bcaf30bab0.zip |
[analyzer] Move the last bits of CallOrObjCMessage over to CallEvent.
This involved refactoring some common pointer-escapes code onto CallEvent,
then having MallocChecker use those callbacks for whether or not to consider
a pointer's /ownership/ as escaping. This still needs to be pinned down, and
probably we want to make the new argumentsMayEscape() function a little more
discerning (content invalidation vs. ownership/metadata invalidation), but
this is a good improvement.
As a bonus, also remove CallOrObjCMessage from the source completely.
llvm-svn: 159557
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index 52f6ba4159d..aeb47a13164 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h" -#include "clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Calls.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" #include "clang/AST/Stmt.h" #include "clang/AST/ParentMap.h" @@ -69,7 +69,7 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { // (6) The 'GDM' is the same as the predecessor. // (7) The LocationContext is the same as the predecessor. // (8) The PostStmt is for a non-consumed Stmt or Expr. - // (9) The successor is a CallExpr StmtPoint (so that we would be able to + // (9) The successor is not a CallExpr StmtPoint (so that we would be able to // find it when retrying a call with no inlining). // Conditions 1 and 2. @@ -116,7 +116,7 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { // Condition 9. const ProgramPoint SuccLoc = succ->getLocation(); if (const StmtPoint *SP = dyn_cast<StmtPoint>(&SuccLoc)) - if (CallOrObjCMessage::canBeInlined(SP->getStmt())) + if (CallEvent::mayBeInlined(SP->getStmt())) return false; return true; |