diff options
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; |