You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
538 B
31 lines
538 B
4 months ago
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||
|
|
||
|
@protocol P // expected-note {{previous}}
|
||
|
-(void)meth1;
|
||
|
@end
|
||
|
|
||
|
@interface I // expected-note {{previous}}
|
||
|
@end
|
||
|
|
||
|
@interface I2
|
||
|
@end
|
||
|
@interface I2(C) // expected-note {{previous}}
|
||
|
@end
|
||
|
|
||
|
extern "C" {
|
||
|
@protocol P // expected-warning {{duplicate protocol definition of 'P' is ignored}}
|
||
|
-(void)meth2;
|
||
|
@end
|
||
|
|
||
|
@interface I // expected-error {{duplicate}}
|
||
|
@end
|
||
|
|
||
|
@interface I2(C) // expected-warning {{duplicate}}
|
||
|
@end
|
||
|
}
|
||
|
|
||
|
void test(id<P> p) {
|
||
|
[p meth1];
|
||
|
[p meth2]; // expected-warning {{not found}}
|
||
|
}
|