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

Ted Kremenek kremenek at apple.com
Mon Sep 29 22:32:44 PDT 2008


Author: kremenek
Date: Tue Sep 30 00:32:44 2008
New Revision: 56831

URL: http://llvm.org/viewvc/llvm-project?rev=56831&view=rev
Log:
Within the transfer function of UnaryOperatorExpr, handle implicit promotions
from the subexpression type to the expression type.

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=56831&r1=56830&r2=56831&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Tue Sep 30 00:32:44 2008
@@ -1682,7 +1682,12 @@
       
       for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
         const GRState* St = GetState(*I);
+        
+        // Get the value of the subexpression.
         RVal V = GetRVal(St, Ex);
+
+        // Perform promotions.
+        V = EvalCast(V, U->getType()); 
         
         if (V.isUnknownOrUndef()) {
           MakeNode(Dst, U, *I, SetRVal(St, U, V));





More information about the cfe-commits mailing list