Added "InfeasibleEdge" to represent an infeasible state transition.

llvm-svn: 45802
This commit is contained in:
Ted Kremenek 2008-01-10 00:58:25 +00:00
parent 51b8e20ccf
commit 3d55c84c99
1 changed files with 13 additions and 2 deletions

View 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