From 3169a2912ea64193c0af0819ad10b495c3baf64e Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 15 Jan 2014 00:59:25 +0000 Subject: [PATCH] ObjectiveC. Improve on diagnostics per Jordan's feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199278 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 2 +- test/PCH/chain-selectors.m | 6 +++--- test/SemaObjC/selector-3.m | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index e956e851b6..1de0c0fd11 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -855,7 +855,7 @@ def warn_auto_implicit_atomic_property : Warning< "property is assumed atomic when auto-synthesizing the property">, InGroup, 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, DefaultIgnore; def warn_unimplemented_protocol_method : Warning< "method %0 in protocol %1 not implemented">, InGroup; diff --git a/test/PCH/chain-selectors.m b/test/PCH/chain-selectors.m index 5de17725ff..2551c643cc 100644 --- a/test/PCH/chain-selectors.m +++ b/test/PCH/chain-selectors.m @@ -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) diff --git a/test/SemaObjC/selector-3.m b/test/SemaObjC/selector-3.m index 76e14b16c1..37c4ec19df 100644 --- a/test/SemaObjC/selector-3.m +++ b/test/SemaObjC/selector-3.m @@ -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}} { } -- 2.40.0