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

Ted Kremenek kremenek at apple.com
Tue Oct 21 12:49:03 PDT 2008


Author: kremenek
Date: Tue Oct 21 14:49:01 2008
New Revision: 57917

URL: http://llvm.org/viewvc/llvm-project?rev=57917&view=rev
Log:
When conjuring symbols for compound assignments, use the promoted type to determine if the symbolic value as a "loc::" or "nonloc::" value.

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=57917&r1=57916&r2=57917&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Tue Oct 21 14:49:01 2008
@@ -2208,13 +2208,13 @@
 
         // EXPERIMENTAL: "Conjured" symbols.
         // FIXME: Handle structs.
-        QualType T = RHS->getType();
-        
-        if (Result.isUnknown() && (T->isIntegerType() || Loc::IsLocType(T))) {            
+        if (Result.isUnknown() &&
+            (CTy->isIntegerType() || Loc::IsLocType(CTy))) {
+          
           unsigned Count = Builder->getCurrentBlockCount();
           SymbolID Sym = SymMgr.getConjuredSymbol(B->getRHS(), Count);
           
-          Result = Loc::IsLocType(B->getRHS()->getType()) 
+          Result = Loc::IsLocType(CTy) 
                  ? cast<SVal>(loc::SymbolVal(Sym)) 
                  : cast<SVal>(nonloc::SymbolVal(Sym));            
         }





More information about the cfe-commits mailing list