diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-18 03:28:48 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-18 03:28:48 +0000 |
commit | fef1f30ea2078f2ad20abcbeb9a003816177044b (patch) | |
tree | c750a1b20d3b6de58f0f3b667df14ed96a6806e4 /clang/lib/Analysis/GRExprEngine.cpp | |
parent | 8f477106a4a41b006c007c4e391c4bb8cca13347 (diff) | |
download | bcm5719-llvm-fef1f30ea2078f2ad20abcbeb9a003816177044b.tar.gz bcm5719-llvm-fef1f30ea2078f2ad20abcbeb9a003816177044b.zip |
Use "VisitLValue" when processing the base for "x.f" field accesses, and "Visit" when processing the base for "x->f" field accesses.
llvm-svn: 57754
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 98e8427a69a..ee7141782f9 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -891,8 +891,12 @@ void GRExprEngine::VisitMemberExpr(MemberExpr* M, NodeTy* Pred, Expr* Base = M->getBase()->IgnoreParens(); NodeSet Tmp; - Visit(Base, Pred, Tmp); - + + if (M->isArrow()) + Visit(Base, Pred, Tmp); // p->f = ... or ... = p->f + else + VisitLValue(Base, Pred, Tmp); // x.f = ... or ... = x.f + for (NodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I != E; ++I) { const GRState* St = GetState(*I); // FIXME: Should we insert some assumption logic in here to determine |