From: Ted Kremenek Date: Tue, 29 Jan 2008 23:36:02 +0000 (+0000) Subject: Added method "markInfeasible" to GRBranchNodeBuilder to disable the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52a16499df87730c0252b431abdf2b2e32d756a6;p=clang Added method "markInfeasible" to GRBranchNodeBuilder to disable the auto-propagation of state along a branch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46537 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathSensitive/GREngine.h b/include/clang/Analysis/PathSensitive/GREngine.h index 175b1fb7ae..33976fa884 100644 --- a/include/clang/Analysis/PathSensitive/GREngine.h +++ b/include/clang/Analysis/PathSensitive/GREngine.h @@ -166,7 +166,7 @@ class GRBranchNodeBuilderImpl { CFGBlock* DstT; CFGBlock* DstF; ExplodedNodeImpl* Pred; - + bool GeneratedTrue; bool GeneratedFalse; @@ -181,6 +181,11 @@ public: const ExplodedGraphImpl& getGraph() const { return *Eng.G; } void generateNodeImpl(void* State, bool branch); + + void markInfeasible(bool branch) { + if (branch) GeneratedTrue = true; + else GeneratedFalse = true; + } }; template @@ -199,10 +204,14 @@ public: return static_cast(NB.getGraph()); } - void generateNode(StateTy State, bool branch) { + inline void generateNode(StateTy State, bool branch) { void *state = GRTrait::toPtr(State); NB.generateNodeImpl(state, branch); } + + inline void markInfeasible(bool branch) { + NB.markInfeasible(branch); + } };