[cfe-commits] r126594 - /cfe/trunk/include/clang/AST/Stmt.h

Chris Lattner sabre at nondot.org
Sun Feb 27 16:17:41 PST 2011


Author: lattner
Date: Sun Feb 27 18:17:41 2011
New Revision: 126594

URL: http://llvm.org/viewvc/llvm-project?rev=126594&view=rev
Log:
add a const version of this accessor.

Modified:
    cfe/trunk/include/clang/AST/Stmt.h

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=126594&r1=126593&r2=126594&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Sun Feb 27 18:17:41 2011
@@ -516,6 +516,9 @@
   void setNextSwitchCase(SwitchCase *SC) { NextSwitchCase = SC; }
 
   Stmt *getSubStmt();
+  const Stmt *getSubStmt() const {
+    return const_cast<SwitchCase*>(this)->getSubStmt();
+  }
 
   SourceRange getSourceRange() const { return SourceRange(); }
 





More information about the cfe-commits mailing list