diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-31 18:23:33 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-31 18:23:33 +0000 |
| commit | c1fb862fda6091abdce88ad334ebd55021b8b203 (patch) | |
| tree | 43d4eabdd5c3c10cc81b8d20d96c90ce350e7f74 /clang/test/SemaObjC/no-protocol-option-tests.m | |
| parent | d7d70e4788a94272908700d4b807631037e3168e (diff) | |
| download | bcm5719-llvm-c1fb862fda6091abdce88ad334ebd55021b8b203.tar.gz bcm5719-llvm-c1fb862fda6091abdce88ad334ebd55021b8b203.zip | |
Patch implements gcc's -Wno-protocol option to suppress warning
on unimplemented methods in protocols adopted by a class.
(radar 7056600).
llvm-svn: 100028
Diffstat (limited to 'clang/test/SemaObjC/no-protocol-option-tests.m')
| -rw-r--r-- | clang/test/SemaObjC/no-protocol-option-tests.m | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/no-protocol-option-tests.m b/clang/test/SemaObjC/no-protocol-option-tests.m new file mode 100644 index 00000000000..5d2da0af48e --- /dev/null +++ b/clang/test/SemaObjC/no-protocol-option-tests.m @@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify %s +// rdar: // 7056600 + +@protocol P +- PMeth; +@end + +// Test1 +@interface I <P> @end +@implementation I @end // no warning with -Wno-protocol + +// Test2 +@interface C -PMeth; @end +@interface C (Category) <P> @end +@implementation C (Category) @end // no warning with -Wno-protocol + +// Test2 +@interface super - PMeth; @end +@interface J : super <P> +- PMeth; // expected-note {{ method definition for 'PMeth' not found}} +@end +@implementation J @end // expected-warning {{incomplete implementation}} + +// Test3 +@interface K : super <P> +@end +@implementation K @end // no warning with -Wno-protocol + +// Test4 +@interface Root @end +@interface L : Root<P> @end +@implementation L @end // no warning with -Wno-protocol |

