aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-07-16 07:07:56 +0000
committerBill Wendling <isanbard@gmail.com>2007-07-16 07:07:56 +0000
commitca51c97fbb10b9d48e1857e01c532493f87cd5f0 (patch)
tree5239db9fd49c6c41218b42bf740515935ed1003c
parent136f93a2b660fc780fc2dba82a6f42ca4dc9164a (diff)
Constify the is*Lvalue() methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39907 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--AST/Expr.cpp4
-rw-r--r--include/clang/AST/Expr.h4
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<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) {
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;