1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc@protocol P // expected-note {{previous}} 4*f4a2713aSLionel Sambuc-(void)meth1; 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface I // expected-note {{previous}} 8*f4a2713aSLionel Sambuc@end 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc@interface I2 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc@interface I2(C) // expected-note {{previous}} 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambucextern "C" { 16*f4a2713aSLionel Sambuc@protocol P // expected-warning {{duplicate protocol definition of 'P' is ignored}} 17*f4a2713aSLionel Sambuc-(void)meth2; 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@interface I // expected-error {{duplicate}} 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@interface I2(C) // expected-warning {{duplicate}} 24*f4a2713aSLionel Sambuc@end 25*f4a2713aSLionel Sambuc} 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambucvoid test(id<P> p) { 28*f4a2713aSLionel Sambuc [p meth1]; 29*f4a2713aSLionel Sambuc [p meth2]; // expected-warning {{not found}} 30*f4a2713aSLionel Sambuc} 31