From: Ted Kremenek Date: Mon, 6 Oct 2008 22:51:42 +0000 (+0000) Subject: Remove DeclStmt::getDecl(). Now clients of DeclStmt must explicitly reason about... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=655137a6c19110620d82d5f03cdcaec3a48c059f;p=clang Remove DeclStmt::getDecl(). Now clients of DeclStmt must explicitly reason about a DeclStmt referring to a collection of Decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57217 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 210a142123..1111bd31e1 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -152,10 +152,7 @@ public: // hasSolitaryDecl - This method returns true if this DeclStmt refers // to a single Decl. bool hasSolitaryDecl() const; - - const ScopedDecl *getDecl() const { return TheDecl; } - ScopedDecl *getDecl() { return TheDecl; } - + const ScopedDecl* getSolitaryDecl() const { assert (hasSolitaryDecl() && "Caller assumes this DeclStmt points to one Decl*");