]> granicus.if.org Git - clang/commitdiff
Fixed bug where GRConstants::AddBindings() did not check for values
authorTed Kremenek <kremenek@apple.com>
Wed, 16 Jan 2008 19:28:16 +0000 (19:28 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 16 Jan 2008 19:28:16 +0000 (19:28 +0000)
that were "not a constant."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46085 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRConstants.cpp

index 56c450420921b99735f38f15848dec9974f840f3..3eff0e0c864335959d855a312687814a2b99e437 100644 (file)
@@ -225,7 +225,8 @@ ExprVariantTy GRConstants::GetBinding(Expr* E) {
 }
 
 void GRConstants::AddBinding(Expr* E, ExprVariantTy V, bool isBlkLvl) {
-  CurrentState = StateMgr.Add(CurrentState, DSPtr(E,isBlkLvl), V.getVal());
+  if (V) 
+    CurrentState = StateMgr.Add(CurrentState, DSPtr(E,isBlkLvl), V.getVal());
 }
 
 void GRConstants::SwitchNodeSets() {