[all-commits] [llvm/llvm-project] cda145: [lldb][NFC] Add some tests for function-local clas...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Sep 9 05:12:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cda1450f1c771712718ef3585315f0ecbb708d8d
      https://github.com/llvm/llvm-project/commit/cda1450f1c771712718ef3585315f0ecbb708d8d
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-09-09 (Thu, 09 Sep 2021)

  Changed paths:
    A lldb/test/API/lang/cpp/function-local-class/Makefile
    A lldb/test/API/lang/cpp/function-local-class/TestCppFunctionLocalClass.py
    A lldb/test/API/lang/cpp/function-local-class/main.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list