aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-21 19:49:01 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-21 19:49:01 +0000
commit0944cccb769648aabc9abd0ba4f47d5d06ce59f8 (patch)
tree291c7773008ce02aff8457b42a255aab1a6dac97 /lib/Analysis/GRExprEngine.cpp
parent6ae98506f93617b1eda486406b376c9b70cd2df3 (diff)
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
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index e6780161d7..fa33028495 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -2208,13 +2208,13 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
// 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));
}