diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-11 19:45:20 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-11 19:45:20 +0000 |
| commit | 9c23e6c6895652eee17a8f34909cbac011f5a304 (patch) | |
| tree | 1b51537d191cbffbf502c19aae9cc82427d2d20c /clang/lib/StaticAnalyzer/Checkers | |
| parent | 52f04650aea7cc93d96966b2bab69c2ee0c080f5 (diff) | |
| download | bcm5719-llvm-9c23e6c6895652eee17a8f34909cbac011f5a304.tar.gz bcm5719-llvm-9c23e6c6895652eee17a8f34909cbac011f5a304.zip | |
[analyzer] Support post-visiting ObjCIvarRefExprs for checkers.
llvm-svn: 123263
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index 3f9eb1b451e..f19f806423e 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -2070,6 +2070,8 @@ void ExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr* Ex, const Expr *baseExpr = Ex->getBase(); Visit(baseExpr, Pred, dstBase); + ExplodedNodeSet dstIvar; + // Using the base, compute the lvalue of the instance variable. for (ExplodedNodeSet::iterator I = dstBase.begin(), E = dstBase.end(); I!=E; ++I) { @@ -2077,8 +2079,12 @@ void ExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr* Ex, const GRState *state = GetState(nodeBase); SVal baseVal = state->getSVal(baseExpr); SVal location = state->getLValue(Ex->getDecl(), baseVal); - MakeNode(Dst, Ex, *I, state->BindExpr(Ex, location)); + MakeNode(dstIvar, Ex, *I, state->BindExpr(Ex, location)); } + + // Perform the post-condition check of the ObjCIvarRefExpr and store + // the created nodes in 'Dst'. + CheckerVisit(Ex, Dst, dstIvar, PostVisitStmtCallback); } //===----------------------------------------------------------------------===// |

