diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-23 20:32:57 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-23 20:32:57 +0000 |
commit | b59625ecea47bf77f10c7a55f3cf6663e396fdc7 (patch) | |
tree | ccd9b6cbf241b4364687eaed95a283a6a791bf65 | |
parent | caf8e3a2dbb56f4411ef61425b8bb07b3c5d554d (diff) | |
download | bcm5719-llvm-b59625ecea47bf77f10c7a55f3cf6663e396fdc7.tar.gz bcm5719-llvm-b59625ecea47bf77f10c7a55f3cf6663e396fdc7.zip |
Test for selector-warning PCH patch.
radar 6507158.
llvm-svn: 109261
-rw-r--r-- | clang/test/PCH/selector-warning.h | 24 | ||||
-rw-r--r-- | clang/test/PCH/selector-warning.m | 19 |
2 files changed, 43 insertions, 0 deletions
diff --git a/clang/test/PCH/selector-warning.h b/clang/test/PCH/selector-warning.h new file mode 100644 index 00000000000..bd419293daf --- /dev/null +++ b/clang/test/PCH/selector-warning.h @@ -0,0 +1,24 @@ +typedef struct objc_selector *SEL; + +@interface Foo +- (void) NotOK; +@end + +@implementation Foo +- (void) foo +{ + SEL a = @selector(b1ar); + a = @selector(b1ar); + a = @selector(bar); + a = @selector(ok); // expected-warning {{unimplemented selector 'ok'}} + a = @selector(ok); + a = @selector(NotOK); // expected-warning {{unimplemented selector 'NotOK'}} + a = @selector(NotOK); + + a = @selector(clNotOk); // expected-warning {{unimplemented selector 'clNotOk'}} + + a = @selector (cl1); + a = @selector (cl2); + a = @selector (instNotOk); // expected-warning {{unimplemented selector 'instNotOk'}} +} +@end diff --git a/clang/test/PCH/selector-warning.m b/clang/test/PCH/selector-warning.m new file mode 100644 index 00000000000..413f64f5419 --- /dev/null +++ b/clang/test/PCH/selector-warning.m @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -x objective-c -emit-pch -o %t.h.pch %S/selector-warning.h +// RUN: %clang_cc1 -include-pch %t.h.pch %s + +@interface Bar ++ (void) clNotOk; +- (void) instNotOk; ++ (void) cl1; +@end + +@implementation Bar +- (void) bar {} ++ (void) cl1 {} ++ (void) cl2 {} +@end + +@implementation Bar(CAT) +- (void) b1ar {} +@end + |