[cfe-commits] r62931 - /cfe/trunk/include/clang/AST/Expr.h
Chris Lattner
sabre at nondot.org
Sat Jan 24 13:08:33 PST 2009
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 {
More information about the cfe-commits
mailing list