19#include "llvm/ADT/ScopeExit.h"
29 State->getStateManager().getRegionManager().getSymbolicRegion(Sym);
39 if (
P.first && !
P.second)
41 if (!
P.first &&
P.second)
46template <
typename AssumeFunction>
49 AssumeFunction &Assume) {
50 if (LLVM_UNLIKELY(State->isPosteriorlyOverconstrained()))
51 return {State, State};
60 return {State, State};
62 auto AssumeStackBuilder =
69 if (LLVM_UNLIKELY(!StFalse)) {
70 ProgramStateRef StInfeasible = State->cloneAsPosteriorlyOverconstrained();
71 assert(StInfeasible->isPosteriorlyOverconstrained());
94 auto AssumeFun = [&, Cond](
bool Assumption) {
102 const llvm::APSInt &From,
103 const llvm::APSInt &To) {
104 auto AssumeFun = [&](
bool Assumption) {
113 return Assumption ? R.first : R.second;
118 const llvm::APSInt &From,
119 const llvm::APSInt &To,
bool InBound) {
122 return InBound ? R.first : R.second;
static DefinedSVal getLocFromSymbol(const ProgramStateRef &State, SymbolRef Sym)
C Language Family Type Representation.
A (possibly-)qualified type.
bool contains(const ProgramState *S) const
void push(const ProgramState *S)
virtual ProgramStateRef assumeInclusiveRangeInternal(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To, bool InBound)=0
ProgramStateRef assumeInclusiveRange(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To, bool InBound)
ProgramStatePair assumeDual(ProgramStateRef State, DefinedSVal Cond)
Returns a pair of states (StTrue, StFalse) where the given condition is assumed to be true or false,...
virtual ~ConstraintManager()
AssumeStackTy AssumeStack
ProgramStatePair assumeInclusiveRangeDual(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To)
Returns a pair of states (StInRange, StOutOfRange) where the given value is assumed to be in the rang...
std::pair< ProgramStateRef, ProgramStateRef > ProgramStatePair
ProgramStateRef assume(ProgramStateRef state, DefinedSVal Cond, bool Assumption)
ProgramStatePair assumeDualImpl(ProgramStateRef &State, AssumeFunction &Assume)
virtual ProgramStateRef assumeInternal(ProgramStateRef state, DefinedSVal Cond, bool Assumption)=0
virtual ConditionTruthVal checkNull(ProgramStateRef State, SymbolRef Sym)
Returns whether or not a symbol is known to be null ("true"), known to be non-null ("false"),...
static bool isLocType(QualType T)
MemRegion - The root abstract class for all memory regions.
ProgramState - This class encapsulates:
virtual QualType getType() const =0
Represents symbolic expression that isn't a location.
The JSON file list parser is used to communicate input to InstallAPI.