summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp
blob: d03527189373423340c2790fa947db557c576acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// clang-format off

// RUN: %build -o %t.exe -- %s
// RUN: %lldb -f %t.exe -s \
// RUN:     %p/Inputs/lookup-by-types.lldbinit 2>&1 | FileCheck %s

class B;
class A {
public:
    static const A constA;
    static A a;
    static B b;
    int val = 1;
};
class B {
public:
    static A a;
    int val = 2;
};
A varA;
B varB;
const A A::constA = varA;
A A::a = varA;
B A::b = varB;
A B::a = varA;

int main(int argc, char **argv) {
  return varA.val + varB.val;
}

// CHECK:      image lookup -type A
// CHECK-NEXT: 1 match found in {{.*}}.exe
// CHECK-NEXT: compiler_type = "class A {
// CHECK-NEXT:     static const A constA;
// CHECK-NEXT:     static A a;
// CHECK-NEXT:     static B b;
// CHECK-NEXT: public:
// CHECK-NEXT:     int val;
// CHECK-NEXT: }"
// CHECK:      image lookup -type B
// CHECK-NEXT: 1 match found in {{.*}}.exe
// CHECK-NEXT:  compiler_type = "class B {
// CHECK-NEXT:     static A a;
// CHECK-NEXT: public:
// CHECK-NEXT:     int val;
// CHECK-NEXT: }"