]> granicus.if.org Git - clang/commitdiff
Added "InfeasibleEdge" to represent an infeasible state transition.
authorTed Kremenek <kremenek@apple.com>
Thu, 10 Jan 2008 00:58:25 +0000 (00:58 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 10 Jan 2008 00:58:25 +0000 (00:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45802 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/ProgramEdge.h

index ee8fae01405af41c54b0b431169fd649057ef56f..1c10196c2807881b4187bc886364c9729054bd63 100644 (file)
@@ -28,7 +28,7 @@ class ProgramEdge {
   uintptr_t Src, Dst;
 public:
   enum EdgeKind { BExprBlk=0,   BlkBExpr=1,   BExprBExpr=2, BlkBlk=3,
-                  BExprSExpr=4, SExprSExpr=5, SExprBExpr=6 };
+                  BExprSExpr=4, SExprSExpr=5, SExprBExpr=6, Infeasible=7 };
   
   static bool classof(const ProgramEdge*) { return true; }
   
@@ -155,7 +155,18 @@ public:
     return E->getKind() == BlkBlk;
   }
 };
-
+  
+class InfeasibleEdge : public ProgramEdge {
+public:
+  InfeasibleEdge(Stmt* S) : ProgramEdge(S,NULL,Infeasible) {}
+  
+  Stmt* getStmt() const { return reinterpret_cast<Stmt*>(RawSrc()); }
+  
+  static bool classof(const ProgramEdge* E) {
+    return E->getKind() == Infeasible;
+  }
+};
+  
 } // end namespace clang