diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-17 17:24:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-17 17:24:14 +0000 |
commit | b6b81d1047aeec4f15b90ca1b9d4d7fcff154f7d (patch) | |
tree | bc531cbff030c43f94298197dbcc9a186d382592 /lib/Analysis/GRExprEngine.cpp | |
parent | d96b35bc6becf8db00d140c11e3d0e53f27567a1 (diff) |
"Implement" GRExprEngine::VisitLValue for ObjCPropertyRefExpr. This is only a bandid; we need to properly handle properties by using locv/nonloc objects and specially handling property assignments in the transfer function for BinaryOperator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index d8ab4b1275..bdf42e99c5 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -431,6 +431,21 @@ void GRExprEngine::VisitLValue(Expr* Ex, NodeTy* Pred, NodeSet& Dst) { case Stmt::MemberExprClass: VisitMemberExpr(cast<MemberExpr>(Ex), Pred, Dst, true); return; + + case Stmt::ObjCPropertyRefExprClass: + // FIXME: Property assignments are lvalues, but not really "locations". + // e.g.: self.x = something; + // Here the "self.x" really can translate to a method call (setter) when + // the assignment is made. Moreover, the entire assignment expression + // evaluate to whatever "something" is, not calling the "getter" for + // the property (which would make sense since it can have side effects). + // We'll probably treat this as a location, but not one that we can + // take the address of. Perhaps we need a new SVal class for cases + // like thsis? + // Note that we have a similar problem for bitfields, since they don't + // have "locations" in the sense that we can take their address. + Dst.Add(Pred); + return; } } |