Home | History | Annotate | Download | only in Index
      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 
     12 #else
     13 
     14 void foo(I2 *i) {
     15   [i meth];
     16 }
     17 
     18 #endif
     19 
     20 // RUN: c-index-test -write-pch %t.h.pch %s -Xclang -detailed-preprocessing-record
     21 // RUN: c-index-test -test-load-source local %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-PARSE %s
     22 // RUN: c-index-test -index-file %s -include %t.h -Xclang -detailed-preprocessing-record | FileCheck -check-prefix=CHECK-INDEX %s
     23 
     24 // CHECK-PARSE: pch-with-errors.m:{{.*}} FunctionDecl=foo
     25 // CHECK-PARSE: pch-with-errors.m:{{.*}} ObjCMessageExpr=meth
     26 
     27 // CHECK-INDEX: [indexDeclaration]: kind: function | name: foo
     28 // CHECK-INDEX: [indexEntityReference]: kind: objc-instance-method | name: meth
     29