xref: /llvm-project/clang/test/Parser/objc-error-qualified-implementation.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
2
3@protocol P
4@end
5
6@interface I @end
7
8@implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}}
9
10@interface J < P,P >
11@end
12
13
14@implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}}
15@end
16
17@interface K @end
18
19@implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}} expected-error {{expected '>'}} expected-note {{to match this '<'}}
20@end
21
22@implementation I (Cat) <P>  // expected-error {{@implementation declaration cannot be protocol qualified}}
23- (void) Meth {}
24@end
25
26@implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}} expected-error {{expected '>'}} expected-note {{to match this '<'}}
27@end
28