[cfe-commits] r57659 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Thu Oct 16 17:55:33 PDT 2008


Author: kremenek
Date: Thu Oct 16 19:55:33 2008
New Revision: 57659

URL: http://llvm.org/viewvc/llvm-project?rev=57659&view=rev
Log:
Remove an untrue assertion: lval::FuncVals can be returned in both rvalue and lvalue contexts.

Modified:
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=57659&r1=57658&r2=57659&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Oct 16 19:55:33 2008
@@ -834,8 +834,10 @@
     return;
 
   } else if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(D)) {
-    assert(!asLValue && "FunctionDecl does not have lvalue.");
-
+    // We return the lval::FuncVal for an FunctionDecl in both rvalue
+    // and lvalue contexts.
+    // FIXME: Does this need to be revised?  We were getting cases in
+    //  real code that did this.
     RVal V = lval::FuncVal(FD);
     MakeNode(Dst, Ex, Pred, SetRVal(St, Ex, V));
     return;





More information about the cfe-commits mailing list