aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-27 16:17:11 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-27 16:17:11 +0000
commit9319b56154cfd9e3c781e54d2ee1c10c5858efed (patch)
tree4cb31da24ff0ab1245602f2a7b8238786d269283 /lib/StaticAnalyzer/Checkers/ExprEngine.cpp
parent04331169f04198eb769925fa17696a21989c9d8b (diff)
[analyzer] Fix crash when handling dot syntax on 'super'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ExprEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/ExprEngine.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
index 8ad094b1d3..79d2a2b2fc 100644
--- a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
@@ -2073,12 +2073,13 @@ void ExprEngine::VisitCall(const CallExpr* CE, ExplodedNode* Pred,
void ExprEngine::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Ex,
ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
-
- // Visit the base expression, which is needed for computing the lvalue
- // of the ivar.
ExplodedNodeSet dstBase;
- const Expr *baseExpr = Ex->getBase();
- Visit(baseExpr, Pred, dstBase);
+
+ // Visit the receiver (if any).
+ if (Ex->isObjectReceiver())
+ Visit(Ex->getBase(), Pred, dstBase);
+ else
+ dstBase = Pred;
ExplodedNodeSet dstPropRef;
@@ -2087,7 +2088,6 @@ void ExprEngine::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Ex,
I!=E; ++I) {
ExplodedNode *nodeBase = *I;
const GRState *state = GetState(nodeBase);
- SVal baseVal = state->getSVal(baseExpr);
MakeNode(dstPropRef, Ex, *I, state->BindExpr(Ex, loc::ObjCPropRef(Ex)));
}