forked from OSchip/llvm-project
Restore a test which I accientally overwrote in my last
patch. llvm-svn: 124911
This commit is contained in:
parent
bdd481507a
commit
a533af7d98
|
@ -1,29 +1,28 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s
|
||||
// rdar://8851684
|
||||
|
||||
@interface Foo
|
||||
- (void) foo;
|
||||
- (void) bar;
|
||||
@end
|
||||
|
||||
@implementation Foo
|
||||
- (void) bar
|
||||
{
|
||||
}
|
||||
|
||||
- (void) foo
|
||||
{
|
||||
SEL a,b,c;
|
||||
a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}}
|
||||
b = @selector(bar);
|
||||
}
|
||||
@end
|
||||
// RUN: %clang_cc1 -verify %s
|
||||
|
||||
@interface I
|
||||
- (id) compare: (char) arg1;
|
||||
- length;
|
||||
@end
|
||||
|
||||
@interface J
|
||||
- (id) compare: (id) arg1;
|
||||
@end
|
||||
|
||||
SEL func()
|
||||
{
|
||||
return @selector(length); // expected-warning {{unimplemented selector 'length'}}
|
||||
return @selector(compare:); // Non warning on multiple selector found.
|
||||
}
|
||||
|
||||
int main() {
|
||||
SEL s = @selector(retain);
|
||||
SEL s1 = @selector(meth1:);
|
||||
SEL s2 = @selector(retainArgument::);
|
||||
SEL s3 = @selector(retainArgument:::::);
|
||||
SEL s4 = @selector(retainArgument:with:);
|
||||
SEL s5 = @selector(meth1:with:with:);
|
||||
SEL s6 = @selector(getEnum:enum:bool:);
|
||||
SEL s7 = @selector(char:float:double:unsigned:short:long:);
|
||||
|
||||
SEL s9 = @selector(:enum:bool:);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -Wselector -verify %s
|
||||
// rdar://8851684
|
||||
|
||||
@interface Foo
|
||||
- (void) foo;
|
||||
- (void) bar;
|
||||
@end
|
||||
|
||||
@implementation Foo
|
||||
- (void) bar
|
||||
{
|
||||
}
|
||||
|
||||
- (void) foo
|
||||
{
|
||||
SEL a,b,c;
|
||||
a = @selector(b1ar); // expected-warning {{unimplemented selector 'b1ar'}}
|
||||
b = @selector(bar);
|
||||
}
|
||||
@end
|
||||
|
||||
@interface I
|
||||
- length;
|
||||
@end
|
||||
|
||||
SEL func()
|
||||
{
|
||||
return @selector(length); // expected-warning {{unimplemented selector 'length'}}
|
||||
}
|
Loading…
Reference in New Issue