r199278 - ObjectiveC. Improve on diagnostics per Jordan's feedback.

Fariborz Jahanian fjahanian at apple.com
Tue Jan 14 16:59:25 PST 2014


Author: fjahanian
Date: Tue Jan 14 18:59:25 2014
New Revision: 199278

URL: http://llvm.org/viewvc/llvm-project?rev=199278&view=rev
Log:
ObjectiveC. Improve on diagnostics per Jordan's feedback.


Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/PCH/chain-selectors.m
    cfe/trunk/test/SemaObjC/selector-3.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=199278&r1=199277&r2=199278&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Jan 14 18:59:25 2014
@@ -855,7 +855,7 @@ def warn_auto_implicit_atomic_property :
   "property is assumed atomic when auto-synthesizing the property">,
   InGroup<ImplicitAtomic>, DefaultIgnore;
 def warn_unimplemented_selector:  Warning<
-  "using @selector on method %0 with no implementation in translation unit">, 
+  "no method with selector %0 is implemented in this translation unit">, 
   InGroup<Selector>, DefaultIgnore;
 def warn_unimplemented_protocol_method : Warning<
   "method %0 in protocol %1 not implemented">, InGroup<Protocol>;

Modified: cfe/trunk/test/PCH/chain-selectors.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-selectors.m?rev=199278&r1=199277&r2=199278&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-selectors.m (original)
+++ cfe/trunk/test/PCH/chain-selectors.m Tue Jan 14 18:59:25 2014
@@ -18,9 +18,9 @@ void bar() {
   // FIXME: Can't verify notes in headers
   //[a f2];
 
-  (void)@selector(x); // expected-warning {{using @selector on method 'x' with no implementation in translation unit}}
-  (void)@selector(y); // expected-warning {{using @selector on method 'y' with no implementation in translation unit}}
-  (void)@selector(e); // expected-warning {{using @selector on method 'e' with no implementation in translation unit}}
+  (void)@selector(x); // expected-warning {{no method with selector 'x' is implemented in this translation unit}}
+  (void)@selector(y); // expected-warning {{no method with selector 'y' is implemented in this translation unit}}
+  (void)@selector(e); // expected-warning {{no method with selector 'e' is implemented in this translation unit}}
 }
 
 @implementation X (Blah)

Modified: cfe/trunk/test/SemaObjC/selector-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/selector-3.m?rev=199278&r1=199277&r2=199278&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/selector-3.m (original)
+++ cfe/trunk/test/SemaObjC/selector-3.m Tue Jan 14 18:59:25 2014
@@ -14,7 +14,7 @@
 - (void) foo
 {
   SEL a,b,c;
-  a = @selector(b1ar);  // expected-warning {{using @selector on method 'b1ar' with no implementation in translation unit}}
+  a = @selector(b1ar);  // expected-warning {{no method with selector 'b1ar' is implemented in this translation unit}}
   b = @selector(bar);
 }
 @end
@@ -25,7 +25,7 @@
 
 SEL func()
 {
-    return  @selector(length);  // expected-warning {{using @selector on method 'length' with no implementation in translation unit}}
+    return  @selector(length);  // expected-warning {{no method with selector 'length' is implemented in this translation unit}}
 }
 
 // rdar://9545564
@@ -69,7 +69,7 @@ extern SEL MySelector(SEL s);
 
 @implementation INTF
 - (void) Meth {
-  if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{using @selector on method '_setQueue:' with no implementation in translation unit}}
+  if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{no method with selector '_setQueue:' is implemented in this translation unit}}
   {
   }
 





More information about the cfe-commits mailing list