Author: lattner
Date: Sat Jan 24 15:08:33 2009
New Revision: 62931
URL: http://llvm.org/viewvc/llvm-project?rev=62931&view=rev
Log:
fix some const-correctness issues.
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=62931&r1=62930&r2=62931&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Sat Jan 24 15:08:33 2009
@@ -647,10 +647,14 @@
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 {
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits