[Lldb-commits] [PATCH] D139649: [lldb] Make ParseTemplateParameterInfos return false if there are no template params

Arthur Eubanks via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 8 14:43:48 PST 2022


aeubanks added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:1251
+          if (has_template_params &&
+              ParseTemplateParameterInfos(die, template_param_infos)) {
+            template_function_decl = m_ast.CreateFunctionDeclaration(
----------------
dblaikie wrote:
> This part changes behavior, yeah? (previously the code was only conditional on `has_template_params` and is now conditional on both that and there actually being template parameter DIEs) Was that intended? If so, is there any testing that could be done to demonstrate the change in behavior?
presumably any visible change would only happen with broken debug info

`has_template_params` is true if there are any template parameter child DIEs, but now we do more checking that those DIEs are actually reasonable

I can revert this back if you want, but this seems better and I don't think I'm going to find time to add a test for broken debug info which may or may not actually hit this code path


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139649/new/

https://reviews.llvm.org/D139649



More information about the lldb-commits mailing list