diff options
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 5fc1fb651b..efd16b416d 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -25,8 +25,9 @@ namespace clang { class ProgramPoint { public: - enum Kind { BlockEntranceKind=0, PostStmtKind=1, BlockExitKind=2, - BlockEdgeSrcKind=3, BlockEdgeDstKind=4, BlockEdgeAuxKind=5 }; + enum Kind { BlockEntranceKind=0, PostStmtKind=1, PostLoadKind=2, + BlockExitKind=3, BlockEdgeSrcKind=4, BlockEdgeDstKind=5, + BlockEdgeAuxKind=6 }; protected: uintptr_t Data; @@ -100,13 +101,25 @@ public: class PostStmt : public ProgramPoint { +protected: + PostStmt(const Stmt* S, Kind k) : ProgramPoint(S, k) {} public: PostStmt(const Stmt* S) : ProgramPoint(S, PostStmtKind) {} - + Stmt* getStmt() const { return (Stmt*) getRawPtr(); } static bool classof(const ProgramPoint* Location) { - return Location->getKind() == PostStmtKind; + unsigned k = Location->getKind(); + return k == PostStmtKind || k == PostLoadKind; + } +}; + +class PostLoad : public PostStmt { +public: + PostLoad(const Stmt* S) : PostStmt(S, PostLoadKind) {} + + static bool classof(const ProgramPoint* Location) { + return Location->getKind() == PostLoadKind; } }; |