From bae1bcb6bf47c6227aaae4758ff91c52f8fc4e9b 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. llvm-svn: 199278 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/PCH/chain-selectors.m | 6 +++--- clang/test/SemaObjC/selector-3.m | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index e956e851b63f..1de0c0fd119a 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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/clang/test/PCH/chain-selectors.m b/clang/test/PCH/chain-selectors.m index 5de17725ff95..2551c643cc8b 100644 --- a/clang/test/PCH/chain-selectors.m +++ b/clang/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/clang/test/SemaObjC/selector-3.m b/clang/test/SemaObjC/selector-3.m index 76e14b16c1f2..37c4ec19dfdf 100644 --- a/clang/test/SemaObjC/selector-3.m +++ b/clang/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}} { }