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