diff options
Diffstat (limited to 'clang/test/SemaObjC/warn-selector-selection.m')
-rw-r--r-- | clang/test/SemaObjC/warn-selector-selection.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/warn-selector-selection.m b/clang/test/SemaObjC/warn-selector-selection.m new file mode 100644 index 0000000..e395f43 --- /dev/null +++ b/clang/test/SemaObjC/warn-selector-selection.m @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +@interface Object +- (void)foo; +@end + +@interface Class1 +- (void)setWindow:(Object *)wdw; +@end + +void foo(void) { + Object *obj; + [obj setWindow:0]; // expected-warning{{'Object' may not respond to 'setWindow:'}} +} |