1 // RUN: c-index-test core -print-source-symbols -- %s | FileCheck %s
2 // RUN: c-index-test core -print-source-symbols -ignore-macros -- %s | FileCheck %s -check-prefix=DISABLED
3 // DISABLED-NOT: macro/C
6 // CHECK: [[@LINE+1]]:9 | macro/C | X1 | [[X1_USR:.*@macro@X1]] | Def |
8 // CHECK: [[@LINE+1]]:9 | macro/C | DEF | [[DEF_USR:.*@macro@DEF]] | Def |
10 // CHECK: [[@LINE+1]]:8 | macro/C | X1 | [[X1_USR]] | Undef |
13 // CHECK: [[@LINE+1]]:9 | macro/C | C | [[C_USR:.*@macro@C]] | Def |
15 // CHECK: [[@LINE+1]]:5 | macro/C | C | [[C_USR]] | Ref |
18 // CHECK: [[@LINE+1]]:8 | macro/C | C | [[C_USR]] | Ref |
21 // CHECK: [[@LINE+1]]:9 | macro/C | C | [[C_USR]] | Ref |
24 // CHECK: [[@LINE+1]]:13 | macro/C | C | [[C_USR]] | Ref |
27 // CHECK: [[@LINE+1]]:14 | macro/C | C | [[C_USR]] | Ref |
31 // Nonexistent macros should not be included.
32 // CHECK-NOT: NOT_DEFINED
37 #if defined(NOT_DEFINED) && NOT_DEFINED
38 #elif !defined(NOT_DEFINED)
41 // CHECK: [[@LINE+1]]:5 | macro/C | __LINE__ | c:@macro@__LINE__ | Ref |
45 // CHECK: [[@LINE+2]]:1 | macro/C | DEF | [[DEF_USR]] | Ref |
46 // CHECK: [[@LINE+1]]:5 | variable/C | i | c:@i | {{.*}} | Def | rel: 0