1 // Without PCH 2 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -include %s -include %s 3 4 // With PCH 5 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -chain-include %s -chain-include %s 6 7 #ifndef HEADER1 8 #define HEADER1 9 //===----------------------------------------------------------------------===// 10 // Primary header 11 12 @interface I 13 +(void)meth; 14 @end 15 16 //===----------------------------------------------------------------------===// 17 #elif !defined(HEADER2) 18 #define HEADER2 19 #if !defined(HEADER1) 20 #error Header inclusion order messed up 21 #endif 22 23 //===----------------------------------------------------------------------===// 24 // Dependent header 25 26 @interface I() 27 @property (assign) id prop; 28 +(void)meth2; 29 @end 30 31 //===----------------------------------------------------------------------===// 32 #else 33 //===----------------------------------------------------------------------===// 34 35 void foo(I *i) { 36 [I meth]; 37 [I meth2]; 38 i.prop = 0; 39 } 40 41 //===----------------------------------------------------------------------===// 42 #endif 43