Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -633,13 +633,14 @@ } } + if (!D->param_begin() && D->getNumParams()) + OS << " <getNumParams() << ">>"; + if (const auto *FTSI = D->getTemplateSpecializationInfo()) dumpTemplateArgumentList(*FTSI->TemplateArguments); - if (!D->param_begin() && D->getNumParams()) - dumpChild([=] { OS << "<getNumParams() << ">>"; }); - else - for (const ParmVarDecl *Parameter : D->parameters()) + if (D->param_begin() || !D->getNumParams()) + for (const auto *Parameter : D->parameters()) dumpDecl(Parameter); if (const auto *C = dyn_cast(D))