From: Ted Kremenek Date: Wed, 13 May 2009 19:23:41 +0000 (+0000) Subject: Add PostStmt::getStmtAs(). This unbreaks the build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bad354120ce0d35901e86ca63e5534b7b9ed092;p=clang Add PostStmt::getStmtAs(). This unbreaks the build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 #include @@ -182,8 +183,10 @@ public: PostStmt(const Stmt* S, const void *tag = 0) : ProgramPoint(S, PostStmtKind, tag) {} - Stmt* getStmt() const { return (Stmt*) getData1(); } + + template + T* getStmtAs() const { return llvm::dyn_cast(getStmt()); } static bool classof(const ProgramPoint* Location) { unsigned k = Location->getKind();