]> granicus.if.org Git - clang/commitdiff
Added method "markInfeasible" to GRBranchNodeBuilder to disable the
authorTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 23:36:02 +0000 (23:36 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 23:36:02 +0000 (23:36 +0000)
auto-propagation of state along a branch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46537 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GREngine.h

index 175b1fb7ae858e2d76e979fbe87acc5f19956928..33976fa884800a2bb1d1f1852c05babe6bd09944 100644 (file)
@@ -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<typename CHECKER>
@@ -199,10 +204,14 @@ public:
     return static_cast<const GraphTy&>(NB.getGraph());
   }
 
-  void generateNode(StateTy State, bool branch) {
+  inline void generateNode(StateTy State, bool branch) {
     void *state = GRTrait<StateTy>::toPtr(State);        
     NB.generateNodeImpl(state, branch);
   }
+  
+  inline void markInfeasible(bool branch) {
+    NB.markInfeasible(branch);
+  }
 };