Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / chain-class-extension.m
blob03fdee70b850f877a5c221d93091d5697a813a5f
1 // Without PCH
2 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -include %s -include %s
4 // With PCH
5 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -chain-include %s -chain-include %s
7 // expected-no-diagnostics
9 #ifndef HEADER1
10 #define HEADER1
11 //===----------------------------------------------------------------------===//
12 // Primary header
14 @interface I
15 +(void)meth;
16 @end
18 //===----------------------------------------------------------------------===//
19 #elif !defined(HEADER2)
20 #define HEADER2
21 #if !defined(HEADER1)
22 #error Header inclusion order messed up
23 #endif
25 //===----------------------------------------------------------------------===//
26 // Dependent header
28 @interface I()
29 @property (assign) id prop;
30 +(void)meth2;
31 @end
33 //===----------------------------------------------------------------------===//
34 #else
35 //===----------------------------------------------------------------------===//
37 void foo(I *i) {
38   [I meth];
39   [I meth2];
40   i.prop = 0;
43 //===----------------------------------------------------------------------===//
44 #endif