diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-07-30 20:22:09 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-07-30 20:22:09 +0000 |
commit | fcd016e57ec6b1a24df7999e062ec2d2198fb69f (patch) | |
tree | 9979f2bc8aab87c8283769f1955610314051d266 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 01c0a2768f905d9d1a67eab789c7dba7ae5ab74b (diff) | |
download | bcm5719-llvm-fcd016e57ec6b1a24df7999e062ec2d2198fb69f.tar.gz bcm5719-llvm-fcd016e57ec6b1a24df7999e062ec2d2198fb69f.zip |
[analyzer] Only allow CallEvents to be created by CallEventManager.
This ensures that it is valid to reference-count any CallEvents, and we
won't accidentally try to reclaim a CallEvent that lives on the stack.
It also hides an ugly switch statement for handling CallExprs!
There should be no functionality change here.
llvm-svn: 160986
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 7db519c5781..a1cd23dc6ba 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -875,15 +875,11 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, Bldr.addNodes(Dst); break; - case Stmt::ObjCMessageExprClass: { + case Stmt::ObjCMessageExprClass: Bldr.takeNodes(Pred); - ObjCMethodCall Call(cast<ObjCMessageExpr>(S), - Pred->getState(), - Pred->getLocationContext()); - VisitObjCMessage(Call, Pred, Dst); + VisitObjCMessage(cast<ObjCMessageExpr>(S), Pred, Dst); Bldr.addNodes(Dst); break; - } case Stmt::ObjCAtThrowStmtClass: { // FIXME: This is not complete. We basically treat @throw as |