forked from OSchip/llvm-project
Added method "canReasonAbout" to ConstraintManager. This method returns true if
a ConstraintManager can usefully reason about the given SVal. llvm-svn: 66624
This commit is contained in:
parent
39df18f6da
commit
4e34f958f4
|
@ -51,6 +51,13 @@ public:
|
|||
const char* nl, const char *sep) = 0;
|
||||
|
||||
virtual void EndPath(const GRState* St) {}
|
||||
|
||||
/// canReasonAbout - Not all ConstraintManagers can accurately reason about
|
||||
/// all SVal values. This method returns true if the ConstraintManager can
|
||||
/// reasonably handle a given SVal value. This is typically queried by
|
||||
/// GRExprEngine to determine if the value should be replaced with a
|
||||
/// conjured symbolic value in order to recover some precision.
|
||||
virtual bool canReasonAbout(SVal X) const = 0;
|
||||
};
|
||||
|
||||
ConstraintManager* CreateBasicConstraintManager(GRStateManager& statemgr);
|
||||
|
|
|
@ -20,6 +20,10 @@ namespace clang {
|
|||
|
||||
SimpleConstraintManager::~SimpleConstraintManager() {}
|
||||
|
||||
bool SimpleConstraintManager::canReasonAbout(SVal X) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
const GRState*
|
||||
SimpleConstraintManager::Assume(const GRState* St, SVal Cond, bool Assumption,
|
||||
bool& isFeasible) {
|
||||
|
|
|
@ -26,6 +26,9 @@ public:
|
|||
SimpleConstraintManager(GRStateManager& statemgr)
|
||||
: StateMgr(statemgr) {}
|
||||
virtual ~SimpleConstraintManager();
|
||||
|
||||
bool canReasonAbout(SVal X) const;
|
||||
|
||||
virtual const GRState* Assume(const GRState* St, SVal Cond, bool Assumption,
|
||||
bool& isFeasible);
|
||||
|
||||
|
|
Loading…
Reference in New Issue