When conjuring symbols for compound assignments, use the promoted type to determine if the symbolic value as a "loc::" or "nonloc::" value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57917 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index e678016..fa33028 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -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));            
         }