From fef1f30ea2078f2ad20abcbeb9a003816177044b Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 18 Oct 2008 03:28:48 +0000 Subject: 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 --- clang/lib/Analysis/GRExprEngine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/lib/Analysis/GRExprEngine.cpp') 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 -- cgit v1.2.3