From: Ted Kremenek Date: Wed, 16 Jan 2008 19:28:16 +0000 (+0000) Subject: Fixed bug where GRConstants::AddBindings() did not check for values X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22f0d976e01e24ab1f77ef82a964df74190916c0;p=clang Fixed bug where GRConstants::AddBindings() did not check for values that were "not a constant." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46085 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp index 56c4504209..3eff0e0c86 100644 --- a/Analysis/GRConstants.cpp +++ b/Analysis/GRConstants.cpp @@ -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() {