2014-10-19 07:47:59 +08:00
|
|
|
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c
|
|
|
|
// RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out
|
2013-01-16 09:22:09 +08:00
|
|
|
// RUN: %test_debuginfo %s %t.out
|
2022-02-09 18:47:07 +08:00
|
|
|
// XFAIL: !system-darwin && gdb-clang-incompatibility
|
2013-01-16 09:22:09 +08:00
|
|
|
// DEBUGGER: delete breakpoints
|
2013-01-18 04:09:50 +08:00
|
|
|
// DEBUGGER: break static-member.cpp:33
|
2013-01-16 09:22:09 +08:00
|
|
|
// DEBUGGER: r
|
2014-03-08 09:03:55 +08:00
|
|
|
// DEBUGGER: ptype MyClass
|
|
|
|
// CHECK: {{struct|class}} MyClass {
|
2013-01-18 04:09:50 +08:00
|
|
|
// CHECK: static const int a;
|
2013-01-16 09:22:09 +08:00
|
|
|
// CHECK-NEXT: static int b;
|
|
|
|
// CHECK-NEXT: static int c;
|
|
|
|
// CHECK-NEXT: int d;
|
|
|
|
// CHECK-NEXT: }
|
2014-03-08 09:03:55 +08:00
|
|
|
// DEBUGGER: p MyClass::a
|
|
|
|
// CHECK: ${{[0-9]}} = 4
|
|
|
|
// DEBUGGER: p MyClass::c
|
|
|
|
// CHECK: ${{[0-9]}} = 15
|
2013-01-16 09:22:09 +08:00
|
|
|
|
|
|
|
// PR14471, PR14734
|
|
|
|
|
2014-03-08 09:03:55 +08:00
|
|
|
class MyClass {
|
2013-01-16 09:22:09 +08:00
|
|
|
public:
|
|
|
|
const static int a = 4;
|
|
|
|
static int b;
|
|
|
|
static int c;
|
|
|
|
int d;
|
|
|
|
};
|
|
|
|
|
2014-03-08 09:03:55 +08:00
|
|
|
int MyClass::c = 15;
|
|
|
|
const int MyClass::a;
|
2013-01-16 09:22:09 +08:00
|
|
|
|
|
|
|
int main() {
|
2014-03-08 09:03:55 +08:00
|
|
|
MyClass instance_MyClass;
|
|
|
|
return MyClass::a;
|
2013-01-16 09:22:09 +08:00
|
|
|
}
|