aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-03-18 18:50:41 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-03-18 18:50:41 +0000
commit90c71268f04369328e8f579007b8b4f1da9feea0 (patch)
treed38ca8ce89860441f2fae5d0801da6f05daf1cdf /lib
parentbf7efa2742dc94363d3561d284c9d634fc5a780f (diff)
Some cleanup, change diagnostic when assigning to
a property which is not lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/Expr.cpp8
-rw-r--r--lib/Sema/SemaExpr.cpp3
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 1b3202dd42..a62dbc9012 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1104,11 +1104,11 @@ Expr::isLvalueResult Expr::isLvalueInternal(ASTContext &Ctx) const {
if (m->isArrow())
return LV_Valid;
Expr *BaseExp = m->getBase();
- if (BaseExp->getStmtClass() == ObjCPropertyRefExprClass)
+ if (BaseExp->getStmtClass() == ObjCPropertyRefExprClass ||
+ BaseExp->getStmtClass() == ObjCImplicitSetterGetterRefExprClass)
return LV_SubObjCPropertySetting;
return
- (BaseExp->getStmtClass() == ObjCImplicitSetterGetterRefExprClass) ?
- LV_SubObjCPropertyGetterSetting : BaseExp->isLvalue(Ctx);
+ BaseExp->isLvalue(Ctx);
}
case UnaryOperatorClass:
if (cast<UnaryOperator>(this)->getOpcode() == UnaryOperator::Deref)
@@ -1324,8 +1324,6 @@ Expr::isModifiableLvalue(ASTContext &Ctx, SourceLocation *Loc) const {
return MLV_InvalidExpression;
case LV_MemberFunction: return MLV_MemberFunction;
case LV_SubObjCPropertySetting: return MLV_SubObjCPropertySetting;
- case LV_SubObjCPropertyGetterSetting:
- return MLV_SubObjCPropertyGetterSetting;
case LV_ClassTemporary:
return MLV_ClassTemporary;
}
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index a4846a9463..6bf8ab90de 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5790,9 +5790,6 @@ static bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {
case Expr::MLV_SubObjCPropertySetting:
Diag = diag::error_no_subobject_property_setting;
break;
- case Expr::MLV_SubObjCPropertyGetterSetting:
- Diag = diag::error_no_subobject_property_getter_setting;
- break;
}
SourceRange Assign;