1// Test that infinite loop in rdar://10418538 was fixed. 2 3// Without PCH 4// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -include %s -include %s %s 5 6// With PCH 7// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -chain-include %s -chain-include %s 8 9#ifndef HEADER1 10#define HEADER1 11//===----------------------------------------------------------------------===// 12// Primary header 13 14@class I; 15 16@interface I2 17@property (readonly) id prop1; 18@end 19 20//===----------------------------------------------------------------------===// 21#elif !defined(HEADER2) 22#define HEADER2 23#if !defined(HEADER1) 24#error Header inclusion order messed up 25#endif 26 27//===----------------------------------------------------------------------===// 28// Dependent header 29 30@interface I 31@end 32 33@interface I(Cat1) 34@end 35 36@interface I(Cat2) 37@end 38 39@interface I2() 40@property (readwrite,assign) id prop1; 41@property (copy) id prop2; 42@end 43 44//===----------------------------------------------------------------------===// 45#else 46//===----------------------------------------------------------------------===// 47 48// expected-note@30 {{receiver is instance of class declared here}} 49void f(I* i) { 50 [i meth]; // expected-warning {{not found}} 51} 52 53@implementation I2 54@synthesize prop1, prop2; 55@end 56 57//===----------------------------------------------------------------------===// 58#endif 59