aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Analysis/PathSensitive/GRState.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRState.h b/include/clang/Analysis/PathSensitive/GRState.h
index 1a165fd698..37af0caadf 100644
--- a/include/clang/Analysis/PathSensitive/GRState.h
+++ b/include/clang/Analysis/PathSensitive/GRState.h
@@ -641,13 +641,19 @@ public:
const GRState* Assume(const GRState* St, SVal Cond, bool Assumption,
bool& isFeasible) {
- return ConstraintMgr->Assume(St, Cond, Assumption, isFeasible);
+ const GRState *state =
+ ConstraintMgr->Assume(St, Cond, Assumption, isFeasible);
+ assert(!isFeasible || state);
+ return isFeasible ? state : NULL;
}
const GRState* AssumeInBound(const GRState* St, SVal Idx, SVal UpperBound,
bool Assumption, bool& isFeasible) {
- return ConstraintMgr->AssumeInBound(St, Idx, UpperBound, Assumption,
- isFeasible);
+ const GRState *state =
+ ConstraintMgr->AssumeInBound(St, Idx, UpperBound, Assumption,
+ isFeasible);
+ assert(!isFeasible || state);
+ return isFeasible ? state : NULL;
}
const llvm::APSInt* getSymVal(const GRState* St, SymbolRef sym) {