1 // RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c
2 // RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out
3 // RUN: %test_debuginfo %s %t.out
4
5 // FIXME: LLDB finds the wrong symbol for "C". rdar://problem/14933867
6 // XFAIL: darwin, gdb-clang-incompatibility
7
8 // DEBUGGER: delete breakpoints
9 // DEBUGGER: break static-member.cpp:33
10 // DEBUGGER: r
11 // DEBUGGER: ptype C
12 // CHECK: {{struct|class}} C {
13 // CHECK: static const int a;
14 // CHECK-NEXT: static int b;
15 // CHECK-NEXT: static int c;
16 // CHECK-NEXT: int d;
17 // CHECK-NEXT: }
18 // DEBUGGER: p C::a
19 // CHECK: ${{[0-9]}} = 4
20 // DEBUGGER: p C::c
21 // CHECK: ${{[0-9]}} = 15
22
23 // PR14471, PR14734
24
25 class C {
26 public:
27 const static int a = 4;
28 static int b;
29 static int c;
30 int d;
31 };
32
33 int C::c = 15;
34 const int C::a;
35
main()36 int main() {
37 C instance_C;
38 return C::a;
39 }
40