From: Ted Kremenek Date: Thu, 10 Jan 2008 00:58:25 +0000 (+0000) Subject: Added "InfeasibleEdge" to represent an infeasible state transition. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6d2360787e5a0bb5d26f3bc7a83059a8b050dc4;p=clang Added "InfeasibleEdge" to represent an infeasible state transition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45802 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/ProgramEdge.h b/include/clang/Analysis/ProgramEdge.h index ee8fae0140..1c10196c28 100644 --- a/include/clang/Analysis/ProgramEdge.h +++ b/include/clang/Analysis/ProgramEdge.h @@ -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(RawSrc()); } + + static bool classof(const ProgramEdge* E) { + return E->getKind() == Infeasible; + } +}; + } // end namespace clang