[cfe-commits] r64144 - /cfe/trunk/include/clang/Analysis/ProgramPoint.h
Ted Kremenek
kremenek at apple.com
Mon Feb 9 09:00:00 PST 2009
Author: kremenek
Date: Mon Feb 9 10:59:59 2009
New Revision: 64144
URL: http://llvm.org/viewvc/llvm-project?rev=64144&view=rev
Log:
Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.
Modified:
cfe/trunk/include/clang/Analysis/ProgramPoint.h
Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ProgramPoint.h?rev=64144&r1=64143&r2=64144&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original)
+++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Mon Feb 9 10:59:59 2009
@@ -20,6 +20,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include <cassert>
+#include <utility>
namespace clang {
@@ -182,12 +183,19 @@
};
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;
More information about the cfe-commits
mailing list