[PATCH] D56753: [ASTDump] Mark null params with a tag rather than a child node
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 15 15:47:44 PST 2019
steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D56753
Files:
lib/AST/ASTDumper.cpp
Index: lib/AST/ASTDumper.cpp
===================================================================
--- lib/AST/ASTDumper.cpp
+++ lib/AST/ASTDumper.cpp
@@ -633,13 +633,14 @@
}
}
+ if (!D->param_begin() && D->getNumParams())
+ OS << " <<NULL params x " << D->getNumParams() << ">>";
+
if (const auto *FTSI = D->getTemplateSpecializationInfo())
dumpTemplateArgumentList(*FTSI->TemplateArguments);
- if (!D->param_begin() && D->getNumParams())
- dumpChild([=] { OS << "<<NULL params x " << D->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<CXXConstructorDecl>(D))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56753.181908.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190115/bf54d1ef/attachment.bin>
More information about the cfe-commits
mailing list