1 | // clang-format off
|
2 |
|
3 | // RUN: %build -o %t.exe -- %s
|
4 | // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
|
5 | // RUN: %p/Inputs/lookup-by-types.lldbinit 2>&1 | FileCheck %s
|
6 |
|
7 | class B;
|
8 | class A {
|
9 | public:
|
10 | static const A constA;
|
11 | static A a;
|
12 | static B b;
|
13 | int val = 1;
|
14 | };
|
15 | class B {
|
16 | public:
|
17 | static A a;
|
18 | int val = 2;
|
19 | };
|
20 | A varA;
|
21 | B varB;
|
22 | const A A::constA = varA;
|
23 | A A::a = varA;
|
24 | B A::b = varB;
|
25 | A B::a = varA;
|
26 |
|
27 | int main(int argc, char **argv) {
|
28 | return varA.val + varB.val;
|
29 | }
|
30 |
|
31 | // CHECK: image lookup -type A
|
32 | // CHECK-NEXT: 1 match found in {{.*}}.exe
|
33 | // CHECK-NEXT: compiler_type = "class A {
|
34 | // CHECK-NEXT: static const A constA;
|
35 | // CHECK-NEXT: static A a;
|
36 | // CHECK-NEXT: static B b;
|
37 | // CHECK-NEXT: public:
|
38 | // CHECK-NEXT: int val;
|
39 | // CHECK-NEXT: }"
|
40 | // CHECK: image lookup -type B
|
41 | // CHECK-NEXT: 1 match found in {{.*}}.exe
|
42 | // CHECK-NEXT: compiler_type = "class B {
|
43 | // CHECK-NEXT: static A a;
|
44 | // CHECK-NEXT: public:
|
45 | // CHECK-NEXT: int val;
|
46 | // CHECK-NEXT: }"
|
47 | |