From: Ted Kremenek Date: Mon, 9 Feb 2009 16:59:59 +0000 (+0000) Subject: Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59753441b6391a9843eff287f0adb2614153b7c8;p=clang 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 --- 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 +#include 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* TaggedData) + : PostStmt(S, TaggedData) { assert(getKind() == PostStmtCustomKind); } + + const std::pair& getTaggedPair() const { + return *reinterpret_cast*>(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;