[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
Fri Dec 9 11:40:30 PST 2022


aeubanks updated this revision to Diff 481711.
aeubanks added a comment.

revert one change to make this nfc


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139649

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -747,9 +747,7 @@
 
   clang::DeclContext *decl_ctx = GetClangDeclContextContainingDIE(die, nullptr);
   TypeSystemClang::TemplateParameterInfos template_param_infos;
-  if (ParseTemplateParameterInfos(die, template_param_infos) &&
-      (!template_param_infos.args.empty() ||
-       template_param_infos.packed_args)) {
+  if (ParseTemplateParameterInfos(die, template_param_infos)) {
     // Most of the parameters here don't matter, but we make sure the base name
     // is empty so when we print the name we only get the template parameters.
     clang::ClassTemplateDecl *class_template_decl =
@@ -1787,9 +1785,7 @@
     metadata.SetIsDynamicCXXType(dwarf->ClassOrStructIsVirtual(die));
 
     TypeSystemClang::TemplateParameterInfos template_param_infos;
-    if (ParseTemplateParameterInfos(die, template_param_infos) &&
-        (!template_param_infos.args.empty() ||
-         template_param_infos.packed_args)) {
+    if (ParseTemplateParameterInfos(die, template_param_infos)) {
       clang::ClassTemplateDecl *class_template_decl =
           m_ast.ParseClassTemplateDecl(
               decl_ctx, GetOwningClangModule(die), attrs.accessibility,
@@ -2123,7 +2119,10 @@
       break;
     }
   }
-  return template_param_infos.args.size() == template_param_infos.names.size();
+  return template_param_infos.args.size() ==
+             template_param_infos.names.size() &&
+         (!template_param_infos.args.empty() ||
+          template_param_infos.packed_args);
 }
 
 bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139649.481711.patch
Type: text/x-patch
Size: 1824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221209/d67e33bc/attachment-0001.bin>


More information about the lldb-commits mailing list