diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-01-10 00:58:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-01-10 00:58:25 +0000 |
commit | b6d2360787e5a0bb5d26f3bc7a83059a8b050dc4 (patch) | |
tree | 1bf007f7aa2516a85cb781ae682352462cf4b07d /include/clang/Analysis/ProgramEdge.h | |
parent | d577b5e4a563e8b6f041fa5a1df103c52be31b32 (diff) |
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
Diffstat (limited to 'include/clang/Analysis/ProgramEdge.h')
-rw-r--r-- | include/clang/Analysis/ProgramEdge.h | 15 |
1 files changed, 13 insertions, 2 deletions
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<Stmt*>(RawSrc()); } + + static bool classof(const ProgramEdge* E) { + return E->getKind() == Infeasible; + } +}; + } // end namespace clang |