From: Chris Lattner Date: Mon, 28 Feb 2011 00:17:41 +0000 (+0000) Subject: add a const version of this accessor. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=702e5474f570d0b83db9f354619b8ac5bc8ed743;p=clang add a const version of this accessor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126594 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index d1f7d667f3..d7934a1af3 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -516,6 +516,9 @@ public: void setNextSwitchCase(SwitchCase *SC) { NextSwitchCase = SC; } Stmt *getSubStmt(); + const Stmt *getSubStmt() const { + return const_cast(this)->getSubStmt(); + } SourceRange getSourceRange() const { return SourceRange(); }