[cfe-commits] r141961 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/arc.m

Fariborz Jahanian fjahanian at apple.com
Fri Oct 14 10:34:08 PDT 2011


Author: fjahanian
Date: Fri Oct 14 12:34:08 2011
New Revision: 141961

URL: http://llvm.org/viewvc/llvm-project?rev=141961&view=rev
Log:
objc-arc: Improve arc diagnostic when method is not
found in receiver's class. // rdar://9970739

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaObjC/arc.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=141961&r1=141960&r2=141961&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Oct 14 12:34:08 2011
@@ -2998,8 +2998,7 @@
 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<

Modified: cfe/trunk/test/SemaObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc.m?rev=141961&r1=141960&r2=141961&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc.m (original)
+++ cfe/trunk/test/SemaObjC/arc.m Fri Oct 14 12:34:08 2011
@@ -668,3 +668,20 @@
 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
+ at interface RestaurantTableViewCell
+- (void) restaurantLocation;
+ at end
+
+ at interface Radar9970739
+- (void) Meth;
+ at end
+
+ at implementation Radar9970739
+- (void) Meth { 
+  RestaurantTableViewCell *cell;
+  [cell restaurantLocatoin]; // expected-error {{no visible @interface for 'RestaurantTableViewCell' declares the selector 'restaurantLocatoin'}}
+}
+ at end
+





More information about the cfe-commits mailing list