[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / llgdb-tests / static-member.cpp
blob29dd84dc8325dfe5ea3a6129dd84c4fc38d01585
1 // RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c
2 // RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out
3 // RUN: %test_debuginfo %s %t.out
4 // XFAIL: !system-darwin && gdb-clang-incompatibility
5 // DEBUGGER: delete breakpoints
6 // DEBUGGER: break static-member.cpp:33
7 // DEBUGGER: r
8 // DEBUGGER: ptype MyClass
9 // CHECK: {{struct|class}} MyClass {
10 // CHECK: static const int a;
11 // CHECK-NEXT: static int b;
12 // CHECK-NEXT: static int c;
13 // CHECK-NEXT: int d;
14 // CHECK-NEXT: }
15 // DEBUGGER: p MyClass::a
16 // CHECK: ${{[0-9]}} = 4
17 // DEBUGGER: p MyClass::c
18 // CHECK: ${{[0-9]}} = 15
20 // PR14471, PR14734
22 class MyClass {
23 public:
24 const static int a = 4;
25 static int b;
26 static int c;
27 int d;
30 int MyClass::c = 15;
31 const int MyClass::a;
33 int main() {
34 MyClass instance_MyClass;
35 return MyClass::a;