diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-04-03 04:34:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-04-03 04:34:49 +0000 |
commit | 8083414ee7cc8f5c807ed6a4e120fb4e0ab50ff8 (patch) | |
tree | 2be30b600c5d1c0b1d5fbff3f94f8cbddbc80c02 /include/clang/Analysis/ProgramPoint.h | |
parent | 45fa623886dfb6a23b3cfd6d8764e05884382180 (diff) |
static analyzer: Add a new ProgramPoint PostCondition to represent the post position of a branch condition, and a new generateNode method to BranchNodeBuilder using PostCondition ProgramPoint. This method generates a new ExplodedNode but not a new block edge.
Patch by Lei Zhang!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 54cfc3dc0d..07b4dea987 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -43,6 +43,7 @@ public: PostStoreKind, PostPurgeDeadSymbolsKind, PostStmtCustomKind, + PostConditionKind, PostLValueKind, PostInitializerKind, CallEnterKind, @@ -221,7 +222,17 @@ public: } }; - +// PostCondition represents the post program point of a branch condition. +class PostCondition : public PostStmt { +public: + PostCondition(const Stmt* S, const LocationContext *L, const void *tag = 0) + : PostStmt(S, PostConditionKind, L, tag) {} + + static bool classof(const ProgramPoint* Location) { + return Location->getKind() == PostConditionKind; + } +}; + class LocationCheck : public StmtPoint { protected: LocationCheck(const Stmt *S, const LocationContext *L, |