diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-28 19:59:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-28 19:59:33 +0000 |
commit | 2a8d6b0852c47e43dac5c1679b4609b752234ed7 (patch) | |
tree | afef366ffc786507bea6bcd4ff21fb69c1ac418f /lib | |
parent | b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 (diff) |
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
<rdar://problem/6732151>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/GRSimpleVals.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp index a38d76d260..8e605ca4c7 100644 --- a/lib/Analysis/GRSimpleVals.cpp +++ b/lib/Analysis/GRSimpleVals.cpp @@ -375,13 +375,11 @@ TryAgain: return NonLoc::MakeIntTruthVal(BasicVals, b); } - else if (isa<loc::SymbolVal>(R)) { + else if (SymbolRef Sym = R.getAsSymbol()) { const SymIntExpr * SE = - Eng.getSymbolManager().getSymIntExpr( - cast<loc::SymbolVal>(R).getSymbol(), - BinaryOperator::NE, - cast<loc::ConcreteInt>(L).getValue(), - Eng.getContext().IntTy); + Eng.getSymbolManager().getSymIntExpr(Sym, BinaryOperator::NE, + cast<loc::ConcreteInt>(L).getValue(), + Eng.getContext().IntTy); return nonloc::SymExprVal(SE); } |