From: Bill Wendling Date: Mon, 16 Jul 2007 07:07:56 +0000 (+0000) Subject: Constify the is*Lvalue() methods. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca51c97fbb10b9d48e1857e01c532493f87cd5f0;p=clang Constify the is*Lvalue() methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39907 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/Expr.cpp b/AST/Expr.cpp index fb1ab13c8c..ae344cc827 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -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(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) { diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index e9b53fce73..47c36bbd5b 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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;