Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Index / skip-parsed-bodies / compile_commands.json
blob991227a843b1d8a76edd9378f24bf8b15ad598a9
3   "directory": ".",
4   "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t1.cpp",
5   "file": "t1.cpp"
6 },
8   "directory": ".",
9   "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t2.cpp -DBLAH",
10   "file": "t2.cpp"
13   "directory": ".",
14   "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t3.cpp -DBLAH",
15   "file": "t3.cpp"
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