1#ifndef HEADER 2#define HEADER 3 4@interface I(cat) 5-(void)meth; 6@end 7 8@interface I2 9-(void)meth; 10@end 11 12struct FFF1 13extern I2 *somevar1; 14 15enum FFF2 16extern I2 *somevar2; 17 18#else 19 20void foo(I2 *i) { 21 [i meth]; 22} 23 24#endif 25 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 29 30// CHECK-PARSE: pch-with-errors.m:{{.*}} FunctionDecl=foo 31// CHECK-PARSE: pch-with-errors.m:{{.*}} ObjCMessageExpr=meth 32 33// CHECK-INDEX: [indexDeclaration]: kind: function | name: foo 34// CHECK-INDEX: [indexEntityReference]: kind: objc-instance-method | name: meth 35