Eric Christopher | 5724ee9 | 2013-01-17 20:09:50 +0000 | [diff] [blame^] | 1 | // RUN: %clangxx -O0 -g %s -o %t -c |
| 2 | // RUN: %clangxx %t -o %t.out |
Eric Christopher | 2ccf3a2 | 2013-01-16 01:22:09 +0000 | [diff] [blame] | 3 | // RUN: %test_debuginfo %s %t.out |
| 4 | |
| 5 | // DEBUGGER: delete breakpoints |
Eric Christopher | 5724ee9 | 2013-01-17 20:09:50 +0000 | [diff] [blame^] | 6 | // DEBUGGER: break static-member.cpp:33 |
Eric Christopher | 2ccf3a2 | 2013-01-16 01:22:09 +0000 | [diff] [blame] | 7 | // DEBUGGER: r |
Eric Christopher | 2ccf3a2 | 2013-01-16 01:22:09 +0000 | [diff] [blame] | 8 | // DEBUGGER: ptype C |
Eric Christopher | 5724ee9 | 2013-01-17 20:09:50 +0000 | [diff] [blame^] | 9 | // CHECK: type = {{struct|class}} C { |
| 10 | // CHECK: static const int a; |
Eric Christopher | 2ccf3a2 | 2013-01-16 01:22:09 +0000 | [diff] [blame] | 11 | // CHECK-NEXT: static int b; |
| 12 | // CHECK-NEXT: static int c; |
| 13 | // CHECK-NEXT: int d; |
| 14 | // CHECK-NEXT: } |
Eric Christopher | 5724ee9 | 2013-01-17 20:09:50 +0000 | [diff] [blame^] | 15 | // DEBUGGER: p C::a |
| 16 | // CHECK: $1 = 4 |
| 17 | // DEBUGGER: p C::c |
| 18 | // CHECK: $2 = 15 |
Eric Christopher | 2ccf3a2 | 2013-01-16 01:22:09 +0000 | [diff] [blame] | 19 | |
| 20 | // PR14471, PR14734 |
| 21 | |
| 22 | class C { |
| 23 | public: |
| 24 | const static int a = 4; |
| 25 | static int b; |
| 26 | static int c; |
| 27 | int d; |
| 28 | }; |
| 29 | |
| 30 | int C::c = 15; |
| 31 | const int C::a; |
| 32 | |
| 33 | int main() { |
| 34 | C instance_C; |
| 35 | return C::a; |
| 36 | } |