Constify the is*Lvalue() methods.

llvm-svn: 39907
This commit is contained in:
Bill Wendling 2007-07-16 07:07:56 +00:00
parent bb1b44f004
commit 457d1343b1
2 changed files with 4 additions and 4 deletions

View File

@ -192,7 +192,7 @@ bool Expr::hasLocalSideEffect() const {
/// - *e, the type of e cannot be a function type
/// - string-constant
///
Expr::isLvalueResult Expr::isLvalue() {
Expr::isLvalueResult Expr::isLvalue() const {
// first, check the type (C99 6.3.2.1)
if (isa<FunctionType>(TR.getCanonicalType())) // from isObjectType()
return LV_NotObjectType;
@ -233,7 +233,7 @@ Expr::isLvalueResult Expr::isLvalue() {
/// if it is a structure or union, does not have any member (including,
/// recursively, any member or element of all contained aggregates or unions)
/// with a const-qualified type.
Expr::isModifiableLvalueResult Expr::isModifiableLvalue() {
Expr::isModifiableLvalueResult Expr::isModifiableLvalue() const {
isLvalueResult lvalResult = isLvalue();
switch (lvalResult) {

View File

@ -68,7 +68,7 @@ public:
LV_IncompleteVoidType,
LV_InvalidExpression
};
isLvalueResult isLvalue();
isLvalueResult isLvalue() const;
/// isModifiableLvalue - C99 6.3.2.1: an lvalue that does not have array type,
/// does not have an incomplete type, does not have a const-qualified type,
@ -84,7 +84,7 @@ public:
MLV_ConstQualified,
MLV_ArrayType
};
isModifiableLvalueResult isModifiableLvalue();
isModifiableLvalueResult isModifiableLvalue() const;
bool isNullPointerConstant(ASTContext &Ctx) const;