37 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: !system-darwin && gdb-clang-incompatibility5// DEBUGGER: delete breakpoints6// DEBUGGER: break static-member.cpp:357// DEBUGGER: r8// DEBUGGER: ptype MyClass9// CHECK: {{struct|class}} MyClass {10// CHECK: static const int a11// CHECK-NEXT: static int b;12// CHECK-NEXT: static int c;13// CHECK: int d;14// CHECK-NEXT: }15// DEBUGGER: p MyClass::a16// CHECK: ${{[0-9]}} = 417// DEBUGGER: p MyClass::c18// CHECK: ${{[0-9]}} = 1519 20// PR14471, PR1473421 22class MyClass {23public:24 const static int a = 4;25 static int b;26 static int c;27 int d;28};29 30int MyClass::c = 15;31const int MyClass::a;32 33int main() {34 MyClass instance_MyClass;35 return MyClass::a;36}37