23 lines · cpp
1// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o2// RUN: %test_debuginfo %s %t.o3// XFAIL: !system-darwin && gdb-clang-incompatibility4// Radar 94407215// If debug info for my_number() is emitted outside function foo's scope6// then a debugger may not be able to handle it. At least one version of7// gdb crashes in such cases.8 9// DEBUGGER: ptype foo10// CHECK: int (void)11 12int foo() {13 struct Local {14 static int my_number() {15 return 42;16 }17 };18 19 int i = 0;20 i = Local::my_number();21 return i + 1;22}23