4 "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t1.cpp",
9 "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t2.cpp -DBLAH",
14 "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t3.cpp -DBLAH",
19 // RUN: c-index-test -index-compile-db %s | FileCheck %s
21 // CHECK: [startedTranslationUnit]
22 // CHECK-NEXT: [enteredMainFile]: t1.cpp
23 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: method_decl | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
24 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: 1
25 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}t.h:9:27
26 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
27 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isRedecl: 1 | isDef: 1 | isContainer: 1
28 // CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS |
29 // CHECK-NEXT: [indexEntityReference]: kind: c++-class | name: C |
30 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}t.h:15:5
31 // CHECK-NEXT: [indexDeclaration]: kind: function | name: foo1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: 1
32 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}t.h:19:5
33 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_val1'
34 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_val2'
35 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_val3'
37 // CHECK-NEXT: [startedTranslationUnit]
38 // CHECK-NEXT: [enteredMainFile]: t2.cpp
39 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: method_decl | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
40 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
41 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
42 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isContainer: skipped
43 // CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS |
44 // CHECK-NEXT: [indexEntityReference]: kind: c++-class | name: C |
45 // CHECK-NEXT: [indexDeclaration]: kind: function | name: foo1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
46 // CHECK-NEXT: [ppIncludedFile]: .{{/|\\\\?}}pragma_once.h
47 // CHECK-NEXT: [indexDeclaration]: kind: function | name: foo2 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: 1
48 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}t.h:25:5
49 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: tsmeth | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: 1
50 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}pragma_once.h:8:7
51 // CHECK: [indexDeclaration]: kind: function | name: imp_foo | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: 1
52 // CHECK-NEXT: [indexEntityReference]: kind: variable | name: some_val | {{.*}} | loc: .{{/|\\\\?}}imported.h:4:5
53 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_val4'
54 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_tsval'
55 // CHECK-NEXT: [diagnostic]: {{.*}} undeclared identifier 'undef_impval'
57 // CHECK-NEXT: [startedTranslationUnit]
58 // CHECK-NEXT: [enteredMainFile]: t3.cpp
59 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: method_decl | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
60 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
61 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isRedecl: 0 | isDef: 0 | isContainer: 0
62 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: method_def2 | {{.*}} | isRedecl: 1 | isDef: 1 | isContainer: skipped
63 // CHECK-NEXT: [indexEntityReference]: kind: namespace | name: NS |
64 // CHECK-NEXT: [indexEntityReference]: kind: c++-class | name: C |
65 // CHECK-NEXT: [indexDeclaration]: kind: function | name: foo1 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
66 // CHECK-NEXT: [ppIncludedFile]: .{{/|\\\\?}}pragma_once.h
67 // CHECK-NEXT: [indexDeclaration]: kind: function | name: foo2 | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
68 // CHECK-NEXT: [indexDeclaration]: kind: variable | {{.*}} | loc: .{{/|\\\\?}}pragma_once.h:3:12
69 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: tsmeth | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
70 // CHECK-NOT: [indexEntityReference]: kind: variable | name: some_val |
71 // CHECK: [indexDeclaration]: kind: function | name: imp_foo | {{.*}} | isRedecl: 0 | isDef: 1 | isContainer: skipped
72 // CHECK-NOT: [indexEntityReference]: kind: variable | name: some_val |
73 // CHECK-NOT: [diagnostic]: {{.*}} undeclared identifier