1*f4a2713aSLionel Sambuc#ifndef HEADER 2*f4a2713aSLionel Sambuc#define HEADER 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface I(cat) 5*f4a2713aSLionel Sambuc-(void)meth; 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface I2 9*f4a2713aSLionel Sambuc-(void)meth; 10*f4a2713aSLionel Sambuc@end 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambucstruct FFF1 13*f4a2713aSLionel Sambucextern I2 *somevar1; 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambucenum FFF2 16*f4a2713aSLionel Sambucextern I2 *somevar2; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc#else 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambucvoid foo(I2 *i) { 21*f4a2713aSLionel Sambuc [i meth]; 22*f4a2713aSLionel Sambuc} 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc#endif 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc// RUN: c-index-test -write-pch %t.h.pch %s -Xclang -detailed-preprocessing-record 27*f4a2713aSLionel Sambuc// RUN: c-index-test -test-load-source local %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-PARSE %s 28*f4a2713aSLionel Sambuc// RUN: c-index-test -index-file %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-INDEX %s 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambuc// CHECK-PARSE: pch-with-errors.m:{{.*}} FunctionDecl=foo 31*f4a2713aSLionel Sambuc// CHECK-PARSE: pch-with-errors.m:{{.*}} ObjCMessageExpr=meth 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc// CHECK-INDEX: [indexDeclaration]: kind: function | name: foo 34*f4a2713aSLionel Sambuc// CHECK-INDEX: [indexEntityReference]: kind: objc-instance-method | name: meth 35