59 lines · plain
1// Test that infinite loop was fixed.2 3// Without PCH4// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -include %s -include %s %s5 6// With PCH7// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -chain-include %s -chain-include %s8 9#ifndef HEADER110#define HEADER111//===----------------------------------------------------------------------===//12// Primary header13 14@class I;15 16@interface I217@property (readonly) id prop1;18@end19 20//===----------------------------------------------------------------------===//21#elif !defined(HEADER2)22#define HEADER223#if !defined(HEADER1)24#error Header inclusion order messed up25#endif26 27//===----------------------------------------------------------------------===//28// Dependent header29 30@interface I31@end32 33@interface I(Cat1)34@end35 36@interface I(Cat2)37@end38 39@interface I2()40@property (readwrite,assign) id prop1;41@property (copy) id prop2;42@end43 44//===----------------------------------------------------------------------===//45#else46//===----------------------------------------------------------------------===//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 I254@synthesize prop1, prop2;55@end56 57//===----------------------------------------------------------------------===//58#endif59