aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-19 17:48:02 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-19 17:48:02 +0000
commitdd0cb9097ff4a9c88cb6a3cd377245ecb260c120 (patch)
tree860aff7bd9057ce7f4bc435c1147b04f5f2fa0fe /lib/Sema
parent3ff2a4b861082f271bb769755ea6d1da4b3e6b8d (diff)
Issue diagnostics (instead of crashing in code gen) when using
property dot-syntax notation to use setter/getters in objective-c. Fixes radar 7553050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaExpr.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index eaf392116f..f8f3e05f56 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3082,15 +3082,9 @@ Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
if (Setter && DiagnoseUseOfDecl(Setter, MemberLoc))
return ExprError();
- if (Getter || Setter) {
+ if (Getter) {
QualType PType;
-
- if (Getter)
- PType = Getter->getResultType();
- else
- // Get the expression type from Setter's incoming parameter.
- PType = (*(Setter->param_end() -1))->getType();
- // FIXME: we must check that the setter has property type.
+ PType = Getter->getResultType();
return Owned(new (Context) ObjCImplicitSetterGetterRefExpr(Getter, PType,
Setter, MemberLoc, BaseExpr));
}