38 lines · cpp
1// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c2// RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out3// RUN: %test_debuginfo %s %t.out4// XFAIL: gdb-clang-incompatibility5 6// DEBUGGER: delete breakpoints7// DEBUGGER: break static-member-2.cpp:368// DEBUGGER: r9// DEBUGGER: ptype C10// CHECK: {{struct|class}} C {11// CHECK: static const int a12// CHECK-NEXT: static int b;13// CHECK-NEXT: static int c;14// CHECK: int d;15// CHECK-NEXT: }16// DEBUGGER: p C::a17// CHECK: 418// DEBUGGER: p C::c19// CHECK: 1520 21// PR14471, PR1473422 23class C {24public:25 const static int a = 4;26 static int b;27 static int c;28 int d;29};30 31int C::c = 15;32const int C::a;33 34int main() {35 C instance_C;36 return C::a;37}38