diff options
| author | Jeremy Morse <jeremy.morse@sony.com> | 2019-10-31 16:51:53 +0000 |
|---|---|---|
| committer | Jeremy Morse <jeremy.morse@sony.com> | 2019-10-31 16:51:53 +0000 |
| commit | 984fad243d179564df31c5f9531a52442e24581a (patch) | |
| tree | aba85a27f1596d456079f6f5eb69e09408730b49 /debuginfo-tests/llgdb-tests/nested-struct.cpp | |
| parent | 34f3c0fc44a5fd8a0f9186002749336e398837cf (diff) | |
Reapply "Import Dexter to debuginfo-tests""
This reverts commit cb935f345683194e42e6e883d79c5a16479acd74.
Discussion in D68708 advises that green dragon is being briskly
refurbished, and it's good to have this patch up testing it.
Diffstat (limited to 'debuginfo-tests/llgdb-tests/nested-struct.cpp')
| -rw-r--r-- | debuginfo-tests/llgdb-tests/nested-struct.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debuginfo-tests/llgdb-tests/nested-struct.cpp b/debuginfo-tests/llgdb-tests/nested-struct.cpp new file mode 100644 index 000000000000..7533e6a81518 --- /dev/null +++ b/debuginfo-tests/llgdb-tests/nested-struct.cpp @@ -0,0 +1,21 @@ +// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o +// RUN: %test_debuginfo %s %t.o +// Radar 9440721 +// If debug info for my_number() is emitted outside function foo's scope +// then a debugger may not be able to handle it. At least one version of +// gdb crashes in such cases. + +// DEBUGGER: ptype foo +// CHECK: int (void) + +int foo() { + struct Local { + static int my_number() { + return 42; + } + }; + + int i = 0; + i = Local::my_number(); + return i + 1; +} |
