[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / pch-with-errors.m
blob397f8e8e17cba7eeae1f83828ea98e63725d0b10
1 #ifndef HEADER
2 #define HEADER
4 @interface I(cat)
5 -(void)meth;
6 @end
8 @interface I2
9 -(void)meth;
10 @end
12 struct FFF1
13 extern I2 *somevar1;
15 enum FFF2
16 extern I2 *somevar2;
18 #else
20 void foo(I2 *i) {
21   [i meth];
24 #endif
26 // RUN: c-index-test -write-pch %t.h.pch %s -Xclang -detailed-preprocessing-record
27 // RUN: c-index-test -test-load-source local %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-PARSE %s
28 // RUN: c-index-test -index-file %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-INDEX %s
30 // CHECK-PARSE: pch-with-errors.m:{{.*}} FunctionDecl=foo
31 // CHECK-PARSE: pch-with-errors.m:{{.*}} ObjCMessageExpr=meth
33 // CHECK-INDEX: [indexDeclaration]: kind: function | name: foo
34 // CHECK-INDEX: [indexEntityReference]: kind: objc-instance-method | name: meth