]> granicus.if.org Git - clang/commitdiff
Function calls and ObjC message expressions can be used in a lvalue context if they...
authorTed Kremenek <kremenek@apple.com>
Sat, 18 Oct 2008 04:08:49 +0000 (04:08 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 18 Oct 2008 04:08:49 +0000 (04:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57760 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index ee7141782f99b854eb63206f4091211908a07be1..103ec145d4ec31578132557d5c659f41839af7d2 100644 (file)
@@ -445,7 +445,18 @@ void GRExprEngine::VisitLValue(Expr* Ex, NodeTy* Pred, NodeSet& Dst) {
       //  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;      
+      return;
+      
+    case Stmt::CallExprClass:
+    case Stmt::ObjCMessageExprClass:
+      // Function calls and message expressions that return temporaries
+      // that are objects can be called in this context.  We need to
+      // enhance our support of struct return values, so right now just
+      // do a regular visit.
+      assert (!Ex->getType()->isIntegerType());
+      assert (!Ex->getType()->isPointerType());
+      Visit(Ex, Pred, Dst);
+      
   }
 }