14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CONSTRAINTMANAGER_H 15 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CONSTRAINTMANAGER_H 21 #include "llvm/ADT/Optional.h" 22 #include "llvm/Support/SaveAndRestore.h" 35 class ProgramStateManager;
58 return Val.hasValue() && Val.getValue();
63 return Val.hasValue() && !Val.getValue();
68 return Val.hasValue();
74 return !Val.hasValue();
102 assert(assume(State, Cond,
false) &&
"System is over constrained.");
120 const llvm::APSInt &From,
121 const llvm::APSInt &To,
126 const llvm::APSInt &From,
127 const llvm::APSInt &To) {
129 assumeInclusiveRange(State, Value, From, To,
true);
137 assumeInclusiveRange(State, Value, From, To,
false);
166 const char *sep) = 0;
175 return checkNull(State, Sym);
185 bool NotifyAssumeClients =
true;
192 virtual bool canReasonAbout(
SVal X)
const = 0;
199 std::unique_ptr<ConstraintManager>
203 std::unique_ptr<ConstraintManager>
209 #endif // LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CONSTRAINTMANAGER_H
bool isConstrainedFalse() const
Return true if the constraint is perfectly constrained to 'false'.
bool isUnderconstrained() const
Return true if the constrained is underconstrained and we do not know if the constraint is true of va...
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
std::unique_ptr< ConstraintManager > CreateRangeConstraintManager(ProgramStateManager &statemgr, SubEngine *subengine)
virtual void EndPath(ProgramStateRef state)
virtual ProgramStatePair assumeInclusiveRangeDual(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To)
ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym)
Convenience method to query the state to see if a symbol is null or not null, or if neither assumptio...
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param Data Additional data for task generation like final * state
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::unique_ptr< ConstraintManager > CreateZ3ConstraintManager(ProgramStateManager &statemgr, SubEngine *subengine)
bool isConstrainedTrue() const
Return true if the constraint is perfectly constrained to 'true'.
ProgramStatePair assumeDual(ProgramStateRef State, DefinedSVal Cond)
Returns a pair of states (StTrue, StFalse) where the given condition is assumed to be true or false...
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
A class responsible for cleaning up unused symbols.
Dataflow Directional Tag Classes.
ConditionTruthVal(bool constraint)
Construct a ConditionTruthVal indicating the constraint is constrained to either true or false...
virtual const llvm::APSInt * getSymVal(ProgramStateRef state, SymbolRef sym) const
If a symbol is perfectly constrained to a constant, attempt to return the concrete value...
bool isConstrained() const
Return true if the constrained is perfectly constrained.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
std::pair< ProgramStateRef, ProgramStateRef > ProgramStatePair