]> granicus.if.org Git - clang/commitdiff
fix some const-correctness issues.
authorChris Lattner <sabre@nondot.org>
Sat, 24 Jan 2009 21:08:33 +0000 (21:08 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 24 Jan 2009 21:08:33 +0000 (21:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62931 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index a93f0f467b1834124dfc5af30f940a2a08510f84..19cd5d5786bc6bf4dbc4fbbba651de9bc78fc19e 100644 (file)
@@ -647,10 +647,14 @@ public:
     assert(isArgumentType() && "calling getArgumentType() when arg is expr");
     return QualType::getFromOpaquePtr(Argument.Ty);
   }
-  Expr* getArgumentExpr() const {
+  Expr *getArgumentExpr() {
     assert(!isArgumentType() && "calling getArgumentExpr() when arg is type");
     return static_cast<Expr*>(Argument.Ex);
   }
+  const Expr *getArgumentExpr() const {
+    return const_cast<SizeOfAlignOfExpr*>(this)->getArgumentExpr();
+  }
+  
   /// Gets the argument type, or the type of the argument expression, whichever
   /// is appropriate.
   QualType getTypeOfArgument() const {