1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s 2*f4a2713aSLionel Sambuc// rdar://12233858 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@protocol P 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface I @end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}} 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@interface J < P,P > 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}} 16*f4a2713aSLionel Sambuc@end 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc@interface K @end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}} 21*f4a2713aSLionel Sambuc@end // expected-error {{expected '>'}} 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc// rdar://13920026 24*f4a2713aSLionel Sambuc@implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}} 25*f4a2713aSLionel Sambuc- (void) Meth {} 26*f4a2713aSLionel Sambuc@end 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc@implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}} 29*f4a2713aSLionel Sambuc@end // expected-error {{expected '>'}} 30