xref: /llvm-project/clang/test/SemaObjC/no-protocol-option-tests.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify -Wno-objc-root-class %s
2
3@protocol P
4- PMeth;
5@end
6
7// Test1
8@interface I  <P> @end
9@implementation I @end //  no warning with -Wno-protocol
10
11// Test2
12@interface C -PMeth; @end
13@interface C (Category) <P> @end
14@implementation C (Category) @end //  no warning with -Wno-protocol
15
16// Test2
17@interface super - PMeth; @end
18@interface J : super <P>
19- PMeth;	// expected-note {{method 'PMeth' declared here}}
20@end
21@implementation J @end // expected-warning {{method definition for 'PMeth' not found}}
22
23// Test3
24@interface K : super <P>
25@end
26@implementation K @end // no warning with -Wno-protocol
27
28// Test4
29@interface Root @end
30@interface L : Root<P> @end
31@implementation L @end // no warning with -Wno-protocol
32