r182812 - Objective-C [qoi]: Improve on diagnostic when a method used

Fariborz Jahanian fjahanian at apple.com
Tue May 28 16:49:33 PDT 2013


Author: fjahanian
Date: Tue May 28 18:49:32 2013
New Revision: 182812

URL: http://llvm.org/viewvc/llvm-project?rev=182812&view=rev
Log:
Objective-C [qoi]: Improve on diagnostic when a method used
in an @selector expression has no implementation.
// rdar://14002507

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=182812&r1=182811&r2=182812&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue May 28 18:49:32 2013
@@ -820,10 +820,10 @@ def warn_auto_readonly_iboutlet_property
   "not work correctly with 'nib' loader">,
   InGroup<DiagGroup<"readonly-iboutlet-property">>;
 def warn_auto_implicit_atomic_property : Warning<
-  "property is assumed atomic when auto-synthesizing the property">, 
+  "property is assumed atomic when auto-synthesizing the property">,
   InGroup<ImplicitAtomic>, DefaultIgnore;
 def warn_unimplemented_selector:  Warning<
-  "unimplemented selector %0">, InGroup<Selector>, DefaultIgnore;
+  "creating selector for nonexistent method %0">, InGroup<Selector>, DefaultIgnore;
 def warn_unimplemented_protocol_method : Warning<
   "method %0 in protocol 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=182812&r1=182811&r2=182812&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-selectors.m (original)
+++ cfe/trunk/test/PCH/chain-selectors.m Tue May 28 18:49:32 2013
@@ -18,9 +18,9 @@ void bar() {
   // FIXME: Can't verify notes in headers
   //[a f2];
 
-  (void)@selector(x); // expected-warning {{unimplemented selector}}
-  (void)@selector(y); // expected-warning {{unimplemented selector}}
-  (void)@selector(e); // expected-warning {{unimplemented selector}}
+  (void)@selector(x); // expected-warning {{creating selector for nonexistent method 'x'}}
+  (void)@selector(y); // expected-warning {{creating selector for nonexistent method 'y'}}
+  (void)@selector(e); // expected-warning {{creating selector for nonexistent method 'e'}}
 }
 
 @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=182812&r1=182811&r2=182812&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/selector-3.m (original)
+++ cfe/trunk/test/SemaObjC/selector-3.m Tue May 28 18:49:32 2013
@@ -14,7 +14,7 @@
 - (void) foo
 {
   SEL a,b,c;
-  a = @selector(b1ar);  // expected-warning {{unimplemented selector 'b1ar'}}
+  a = @selector(b1ar);  // expected-warning {{creating selector for nonexistent method 'b1ar'}}
   b = @selector(bar);
 }
 @end
@@ -25,7 +25,7 @@
 
 SEL func()
 {
-    return  @selector(length);  // expected-warning {{unimplemented selector 'length'}}
+    return  @selector(length);  // expected-warning {{creating selector for nonexistent method 'length'}}
 }
 
 // rdar://9545564
@@ -69,7 +69,7 @@ extern SEL MySelector(SEL s);
 
 @implementation INTF
 - (void) Meth {
-  if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{unimplemented selector '_setQueue:'}} 
+  if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{creating selector for nonexistent method '_setQueue:'}} 
   {
   }
 





More information about the cfe-commits mailing list