blob: b94c422c07c48f21c3b7c0405c786eff09806088 [file] [log] [blame]
Eric Christopher5724ee92013-01-17 20:09:50 +00001// RUN: %clangxx -O0 -g %s -o %t -c
2// RUN: %clangxx %t -o %t.out
Eric Christopher2ccf3a22013-01-16 01:22:09 +00003// RUN: %test_debuginfo %s %t.out
4
5// DEBUGGER: delete breakpoints
Eric Christopher5724ee92013-01-17 20:09:50 +00006// DEBUGGER: break static-member.cpp:33
Eric Christopher2ccf3a22013-01-16 01:22:09 +00007// DEBUGGER: r
Eric Christopher2ccf3a22013-01-16 01:22:09 +00008// DEBUGGER: ptype C
Eric Christopher5724ee92013-01-17 20:09:50 +00009// CHECK: type = {{struct|class}} C {
10// CHECK: static const int a;
Eric Christopher2ccf3a22013-01-16 01:22:09 +000011// CHECK-NEXT: static int b;
12// CHECK-NEXT: static int c;
13// CHECK-NEXT: int d;
14// CHECK-NEXT: }
Eric Christopher5724ee92013-01-17 20:09:50 +000015// DEBUGGER: p C::a
16// CHECK: $1 = 4
17// DEBUGGER: p C::c
18// CHECK: $2 = 15
Eric Christopher2ccf3a22013-01-16 01:22:09 +000019
20// PR14471, PR14734
21
22class C {
23public:
24 const static int a = 4;
25 static int b;
26 static int c;
27 int d;
28};
29
30int C::c = 15;
31const int C::a;
32
33int main() {
34 C instance_C;
35 return C::a;
36}