diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-13 19:23:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-13 19:23:41 +0000 |
commit | 6bad354120ce0d35901e86ca63e5534b7b9ed092 (patch) | |
tree | 474052021c11cd815d19c71ae26994bd6db9bf47 /include/clang/Analysis/ProgramPoint.h | |
parent | 0c31317a8d031227d6f1726e555f3e1bb044af17 (diff) |
Add PostStmt::getStmtAs(). This unbreaks the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 8e6d5ec831..d2b536ca1c 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -19,6 +19,7 @@ #include "llvm/Support/DataTypes.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/Support/Casting.h" #include <cassert> #include <utility> @@ -182,8 +183,10 @@ public: PostStmt(const Stmt* S, const void *tag = 0) : ProgramPoint(S, PostStmtKind, tag) {} - Stmt* getStmt() const { return (Stmt*) getData1(); } + + template<typename T> + T* getStmtAs() const { return llvm::dyn_cast<T>(getStmt()); } static bool classof(const ProgramPoint* Location) { unsigned k = Location->getKind(); |