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