Right now LLDB ignores nested template type:
echo " template <typename T> struct A {}; int main() { A<A<int>> s; } " > sample.cc clang++ sample.cc -g -O0 lldb-15 a.out -o "breakpoint set -l 6 -f sample.cc" -o "run" -o "frame variable"
The result:
(A<A<>>) s = {}
It looks like this CL introduced this behavior: https://reviews.llvm.org/D92425
Before the LLDB was resolving this type correctly:
lldb-11 a.out -o "breakpoint set -l 6 -f sample.cc" -o "run" -o "frame variable" (A<A<int>) s = {}
I discussed this issue with Raphael in discord:
https://discord.com/channels/636084430946959380/636732809708306432/980825811714191371
Apparently in this case Clang emits A<int> as a forward declaration:
./llvm-dwarfdump a.out 0x000005b4: DW_TAG_base_type DW_AT_name ("int") DW_AT_encoding (DW_ATE_signed) DW_AT_byte_size (0x04) 0x000005bb: DW_TAG_structure_type DW_AT_calling_convention (DW_CC_pass_by_value) DW_AT_name ("A<A<int> >") DW_AT_byte_size (0x01) DW_AT_decl_file ("/home/teemperor/test/args.cpp") DW_AT_decl_line (2) 0x000005c4: DW_TAG_template_type_parameter DW_AT_type (0x000005ce "A<int>") DW_AT_name ("T") 0x000005cd: NULL 0x000005ce: DW_TAG_structure_type DW_AT_name ("A<int>") DW_AT_declaration (true) 0x000005d3: NULL
So for LLDB it looks the same as template with empty arguments.
Turning back the old logic is fixing this issue. Other tests from LLVM test suite on Linux seems to be green.