Filipe Cabecinhas | 090a237 | 2014-10-18 23:47:59 +0000 | [diff] [blame^] | 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 |
Adrian Prantl | 8b466d5 | 2014-03-08 01:21:37 +0000 | [diff] [blame] | 3 | // RUN: %test_debuginfo %s %t.out |
| 4 | |
| 5 | // FIXME: LLDB finds the wrong symbol for "C". rdar://problem/14933867 |
| 6 | // XFAIL: darwin |
| 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 | |
| 36 | int main() { |
| 37 | C instance_C; |
| 38 | return C::a; |
| 39 | } |