From ca51c97fbb10b9d48e1857e01c532493f87cd5f0 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 16 Jul 2007 07:07:56 +0000 Subject: [PATCH] Constify the is*Lvalue() methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39907 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/Expr.cpp | 4 ++-- include/clang/AST/Expr.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; -- 2.50.1