ObjectiveC. Improve on diagnostics per Jordan's feedback.

llvm-svn: 199278
This commit is contained in:
Fariborz Jahanian 2014-01-15 00:59:25 +00:00
parent 0f83390540
commit bae1bcb6bf
3 changed files with 7 additions and 7 deletions

View File

@ -855,7 +855,7 @@ def warn_auto_implicit_atomic_property : Warning<
"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>;

View File

@ -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)

View File

@ -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}}
{
}