[lldb][NFC] Add some tests for function-local classes and document some bugs

Authored by teemperor on Aug 31 2021, 4:02 AM.


[lldb][NFC] Add some tests for function-local classes and document some bugs

This feature doesn't seem to have any dedicated test. Instead some random tests
(e.g. the bitfield tests) are declaring function-local classes for some reason.
This adds a dedicated test so we can clean up those other tests.

Also add FIXME's for some basic stuff that doesn't work. The first FIXME is a
good beginner bug which just requires prepending the function name (in case we
decide to fix it instead of documenting this behaviour). The second FIXME is
caused by LLDB searching for definitions by name (which also seems to miss the
function name so there is a conflict with the outer type).

Some more things that should be tested (and might not work):

  • Local classes with member functions with local classes.
  • Classes in different functions with same name.
  • Classes with the same name in different TUs with internal linkage functions of the same name.
  • Empty classes are parsed by the DWARF parser in a fast path, so that requires dedicated tests.
  • Repeat some of the tested logic for C.


teemperorSep 9 2021, 5:12 AM
rG6c8ff4032e2b: [OptParser] NFC: Remove unused template arg 'name' from bool opt