Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjCXX / objc-extern-c.mm
blob6bd37610ae43ef61c7683b8239b900f8a5dc38d3
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @protocol P // expected-note {{previous}}
4 -(void)meth1;
5 @end
7 @interface I // expected-note {{previous}}
8 @end
10 @interface I2
11 @end
12 @interface I2(C) // expected-note {{previous}}
13 @end
15 extern "C" {
16 @protocol P // expected-warning {{duplicate protocol definition of 'P' is ignored}}
17 -(void)meth2;
18 @end
20 @interface I // expected-error {{duplicate}}
21 @end
23 @interface I2(C) // expected-warning {{duplicate}}
24 @end
27 void test(id<P> p) {
28   [p meth1];
29   [p meth2]; // expected-warning {{not found}}