]> granicus.if.org Git - clang/commitdiff
objc-arc: Improve arc diagnostic when method is not
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 14 Oct 2011 17:34:08 +0000 (17:34 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 14 Oct 2011 17:34:08 +0000 (17:34 +0000)
found in receiver's class. // rdar://9970739

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141961 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaObjC/arc.m

index 97a136f89559a358eafc314efe989d3024cd3218..ab4a843e14518a4d2d47f466d11ca458556071a7 100644 (file)
@@ -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<
index dc5a1fe9220839e8b2d4e2bc58a5006de36c6292..ed6e60d8dc2f1880d23af447cb87dc5841ad9022 100644 (file)
@@ -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
+