diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-06-10 19:02:48 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-06-10 19:02:48 +0000 |
commit | 46b0fc6db2d09f5bf735bea4a399a9574c5a7fa1 (patch) | |
tree | c738a50c7d10f8f8a7b7cc02be9b8e1b05af5e69 /lib/Sema/SemaPseudoObject.cpp | |
parent | da2b70b20421e5046bab33c4f5d579fc0b9d2d42 (diff) |
Objective-C. Don't ignore availability attribute when
doing Objective-C subscript access. // rdar://16842487
PR19682.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index eaed1e47e9..c649cbe38d 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -1359,6 +1359,8 @@ ExprResult ObjCSubscriptOpBuilder::buildGet() { // Arguments. Expr *args[] = { Index }; assert(InstanceBase); + if (AtIndexGetter) + S.DiagnoseUseOfDecl(AtIndexGetter, GenericLoc); msg = S.BuildInstanceMessageImplicit(InstanceBase, receiverType, GenericLoc, AtIndexGetterSelector, AtIndexGetter, @@ -1375,7 +1377,8 @@ ExprResult ObjCSubscriptOpBuilder::buildSet(Expr *op, SourceLocation opcLoc, bool captureSetValueAsResult) { if (!findAtIndexSetter()) return ExprError(); - + if (AtIndexSetter) + S.DiagnoseUseOfDecl(AtIndexSetter, GenericLoc); QualType receiverType = InstanceBase->getType(); Expr *Index = InstanceKey; |