summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-24 21:08:33 +0000
committerChris Lattner <sabre@nondot.org>2009-01-24 21:08:33 +0000
commit7bf46469f388a9d50ef29aa8759458978f43b07d (patch)
tree4040bdc3bd505c7f8bfcdf246cde1699c26706f6
parent096d3ecb5196ebae3bcc35949a6212ee59730ac5 (diff)
downloadbcm5719-llvm-7bf46469f388a9d50ef29aa8759458978f43b07d.tar.gz
bcm5719-llvm-7bf46469f388a9d50ef29aa8759458978f43b07d.zip
fix some const-correctness issues.
llvm-svn: 62931
-rw-r--r--clang/include/clang/AST/Expr.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index a93f0f467b1..19cd5d5786b 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -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 {
OpenPOWER on IntegriCloud