diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-09 16:59:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-09 16:59:59 +0000 |
commit | 59753441b6391a9843eff287f0adb2614153b7c8 (patch) | |
tree | f9c3c0aac411fb3ed85cdc9842c9e8a43e6d8002 /include/clang/Analysis/ProgramPoint.h | |
parent | f4be8ee748831bc23e35b542e6c1bb6d1eb49baa (diff) |
Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index c296bda496..ee742634be 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -20,6 +20,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include <cassert> +#include <utility> namespace clang { @@ -182,12 +183,19 @@ public: }; class PostStmtCustom : public PostStmt { - PostStmtCustom(const Stmt* S, const void* Data) - : PostStmt(S, Data) { + PostStmtCustom(const Stmt* S, + const std::pair<const void*, const void*>* TaggedData) + : PostStmt(S, TaggedData) { assert(getKind() == PostStmtCustomKind); } + + const std::pair<const void*, const void*>& getTaggedPair() const { + return *reinterpret_cast<std::pair<const void*, const void*>*>(getData2()); + } + + const void* getTag() const { return getTaggedPair().first; } - void* getCustomData() const { return getData2(); } + const void* getTaggedData() const { return getTaggedPair().second; } static bool classof(const ProgramPoint* Location) { return Location->getKind() == PostStmtCustomKind; |