Skip to content

Commit 7e7070b

Browse files
committed
Fixed bug where GRConstants::AddBindings() did not check for values
that were "not a constant." llvm-svn: 46085
1 parent deac519 commit 7e7070b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/Analysis/GRConstants.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ ExprVariantTy GRConstants::GetBinding(Expr* E) {
225225
}
226226

227227
void GRConstants::AddBinding(Expr* E, ExprVariantTy V, bool isBlkLvl) {
228-
CurrentState = StateMgr.Add(CurrentState, DSPtr(E,isBlkLvl), V.getVal());
228+
if (V)
229+
CurrentState = StateMgr.Add(CurrentState, DSPtr(E,isBlkLvl), V.getVal());
229230
}
230231

231232
void GRConstants::SwitchNodeSets() {

0 commit comments

Comments
 (0)