[cfe-commits] r71143 - /cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h
Mike Stump
mrs at apple.com
Wed May 6 19:16:57 PDT 2009
Author: mrs
Date: Wed May 6 21:16:57 2009
New Revision: 71143
URL: http://llvm.org/viewvc/llvm-project?rev=71143&view=rev
Log:
Merge in 71134:
Bug fix: Not all ConstraintManagers always return a null state when setting
isFeasible to false. This is something we may wish to do further validation on.
Modified:
cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h
Modified: cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h?rev=71143&r1=71142&r2=71143&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRState.h Wed May 6 21:16:57 2009
@@ -641,13 +641,19 @@
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) {
More information about the cfe-commits
mailing list