aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-18 03:28:48 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-18 03:28:48 +0000
commit5c456fe4d354dab9e8a1309aefe828ea7b6d6f26 (patch)
tree817441201fdbf997e537910c8c91aebaabe3e1c9 /lib/Analysis/GRExprEngine.cpp
parent7ae48ee2fb80b0a3ac6ad912b465a077c7591a19 (diff)
Use "VisitLValue" when processing the base for "x.f" field accesses, and "Visit" when processing the base for "x->f" field accesses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 98e8427a69..ee7141782f 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/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