fix some const-correctness issues.

llvm-svn: 62931
This commit is contained in:
Chris Lattner 2009-01-24 21:08:33 +00:00
parent 096d3ecb51
commit 7bf46469f3
1 changed files with 5 additions and 1 deletions

View File

@ -647,10 +647,14 @@ public:
assert(isArgumentType() && "calling getArgumentType() when arg is expr"); assert(isArgumentType() && "calling getArgumentType() when arg is expr");
return QualType::getFromOpaquePtr(Argument.Ty); return QualType::getFromOpaquePtr(Argument.Ty);
} }
Expr* getArgumentExpr() const { Expr *getArgumentExpr() {
assert(!isArgumentType() && "calling getArgumentExpr() when arg is type"); assert(!isArgumentType() && "calling getArgumentExpr() when arg is type");
return static_cast<Expr*>(Argument.Ex); 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 /// Gets the argument type, or the type of the argument expression, whichever
/// is appropriate. /// is appropriate.
QualType getTypeOfArgument() const { QualType getTypeOfArgument() const {