2011-11-13 05:07:46 +08:00
|
|
|
// Test that infinite loop in rdar://10418538 was fixed.
|
|
|
|
|
|
|
|
// Without PCH
|
2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -include %s -include %s %s
|
2011-11-13 05:07:46 +08:00
|
|
|
|
|
|
|
// With PCH
|
2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -chain-include %s -chain-include %s
|
2011-11-13 05:07:46 +08:00
|
|
|
|
|
|
|
#ifndef HEADER1
|
|
|
|
#define HEADER1
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Primary header
|
|
|
|
|
|
|
|
@class I;
|
|
|
|
|
2011-11-14 12:52:29 +08:00
|
|
|
@interface I2
|
|
|
|
@property (readonly) id prop1;
|
|
|
|
@end
|
|
|
|
|
2011-11-13 05:07:46 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#elif !defined(HEADER2)
|
|
|
|
#define HEADER2
|
|
|
|
#if !defined(HEADER1)
|
|
|
|
#error Header inclusion order messed up
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Dependent header
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I(Cat1)
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I(Cat2)
|
|
|
|
@end
|
|
|
|
|
2011-11-14 12:52:29 +08:00
|
|
|
@interface I2()
|
|
|
|
@property (readwrite,assign) id prop1;
|
|
|
|
@property (copy) id prop2;
|
|
|
|
@end
|
|
|
|
|
2011-11-13 05:07:46 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#else
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2013-05-15 23:27:35 +08:00
|
|
|
// expected-note@30 {{receiver is instance of class declared here}}
|
2011-11-13 05:07:46 +08:00
|
|
|
void f(I* i) {
|
|
|
|
[i meth]; // expected-warning {{not found}}
|
|
|
|
}
|
|
|
|
|
2011-11-14 12:52:29 +08:00
|
|
|
@implementation I2
|
|
|
|
@synthesize prop1, prop2;
|
|
|
|
@end
|
|
|
|
|
2011-11-13 05:07:46 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#endif
|