summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-10-14 17:34:08 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-10-14 17:34:08 +0000
commita1de8cb4b5b1c4139ebfc266ba5d3842421fc8a8 (patch)
treefdc7cf10b9f0cf5cb2a8cb66fec316a9c5db3c03
parentd1af3b901a2176bc7f4b7e2fadcd25110576b454 (diff)
objc-arc: Improve arc diagnostic when method is not
found in receiver's class. // rdar://9970739 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141961 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--test/SemaObjC/arc.m17
2 files changed, 18 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 97a136f895..ab4a843e14 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -2998,8 +2998,7 @@ def err_arc_method_not_found : Error<
def err_arc_receiver_forward_class : Error<
"receiver %0 for class message is a forward declaration">;
def err_arc_may_not_respond : Error<
- "receiver type %0 for instance message does not declare a method with "
- "selector %1">;
+ "no visible @interface for %0 declares the selector %1">;
def err_arc_receiver_forward_instance : Error<
"receiver type %0 for instance message is a forward declaration">;
def err_arc_collection_forward : Error<
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m
index dc5a1fe922..ed6e60d8dc 100644
--- a/test/SemaObjC/arc.m
+++ b/test/SemaObjC/arc.m
@@ -668,3 +668,20 @@ void test38() {
void _NSCalc(NSColor* color, NSColor* bezelColors[]) __attribute__((unavailable("not available in automatic reference counting mode")));
void _NSCalcBeze(NSColor* color, NSColor* bezelColors[]); // expected-error {{must explicitly describe intended ownership of an object array parameter}}
+
+// rdar://9970739
+@interface RestaurantTableViewCell
+- (void) restaurantLocation;
+@end
+
+@interface Radar9970739
+- (void) Meth;
+@end
+
+@implementation Radar9970739
+- (void) Meth {
+ RestaurantTableViewCell *cell;
+ [cell restaurantLocatoin]; // expected-error {{no visible @interface for 'RestaurantTableViewCell' declares the selector 'restaurantLocatoin'}}
+}
+@end
+