31 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@protocol P // expected-note {{previous}}4-(void)meth1;5@end6 7@interface I // expected-note {{previous}}8@end9 10@interface I211@end12@interface I2(C) // expected-note {{previous}}13@end14 15extern "C" {16@protocol P // expected-warning {{duplicate protocol definition of 'P' is ignored}}17-(void)meth2;18@end19 20@interface I // expected-error {{duplicate}}21@end22 23@interface I2(C) // expected-warning {{duplicate}}24@end25}26 27void test(id<P> p) {28 [p meth1];29 [p meth2]; // expected-warning {{not found}}30}31