[cfe-commits] r46537 - /cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h

Ted Kremenek kremenek at apple.com
Tue Jan 29 15:36:03 PST 2008


Author: kremenek
Date: Tue Jan 29 17:36:02 2008
New Revision: 46537

URL: http://llvm.org/viewvc/llvm-project?rev=46537&view=rev
Log:
Added method "markInfeasible" to GRBranchNodeBuilder to disable the
auto-propagation of state along a branch.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h?rev=46537&r1=46536&r2=46537&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h Tue Jan 29 17:36:02 2008
@@ -166,7 +166,7 @@
   CFGBlock* DstT;
   CFGBlock* DstF;
   ExplodedNodeImpl* Pred;
-  
+
   bool GeneratedTrue;
   bool GeneratedFalse;
   
@@ -181,6 +181,11 @@
   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 @@
     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);
+  }
 };
   
   





More information about the cfe-commits mailing list