diff options
Diffstat (limited to 'test/SemaObjC/method-undef-extension-warn-1.m')
-rw-r--r-- | test/SemaObjC/method-undef-extension-warn-1.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m new file mode 100644 index 0000000..7ce015f --- /dev/null +++ b/test/SemaObjC/method-undef-extension-warn-1.m @@ -0,0 +1,25 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +@interface MyClass +@end + +@protocol P +- (void)Pmeth; +- (void)Pmeth1; +@end + +// Class extension +@interface MyClass () <P> +- (void)meth2; +@end + +// Add a category to test that clang does not emit warning for this method. +@interface MyClass (Category) +- (void)categoryMethod; +@end + +@implementation MyClass // expected-warning {{incomplete implementation}} \ + expected-warning {{method definition for 'meth2' not found}} \ + expected-warning {{method definition for 'Pmeth1' not found}} +- (void)Pmeth {} +@end |