[PATCH] D55083: Re-arrange content in FunctionDecl dump
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 29 15:18:30 PST 2018
steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.
Output all content which is local to the FunctionDecl before traversing
to child AST nodes.
Repository:
rC Clang
https://reviews.llvm.org/D55083
Files:
lib/AST/ASTDumper.cpp
Index: lib/AST/ASTDumper.cpp
===================================================================
--- lib/AST/ASTDumper.cpp
+++ lib/AST/ASTDumper.cpp
@@ -884,22 +884,6 @@
}
}
- if (const FunctionTemplateSpecializationInfo *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())
- dumpDecl(Parameter);
-
- if (const CXXConstructorDecl *C = dyn_cast<CXXConstructorDecl>(D))
- for (CXXConstructorDecl::init_const_iterator I = C->init_begin(),
- E = C->init_end();
- I != E; ++I)
- dumpCXXCtorInitializer(*I);
-
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
if (MD->size_overridden_methods() != 0) {
auto dumpOverride = [=](const CXXMethodDecl *D) {
@@ -923,6 +907,22 @@
}
}
+ if (!D->param_begin() && D->getNumParams())
+ dumpChild([=] { OS << "<<NULL params x " << D->getNumParams() << ">>"; });
+ else
+ for (const ParmVarDecl *Parameter : D->parameters())
+ dumpDecl(Parameter);
+
+ if (const FunctionTemplateSpecializationInfo *FTSI =
+ D->getTemplateSpecializationInfo())
+ dumpTemplateArgumentList(*FTSI->TemplateArguments);
+
+ if (const CXXConstructorDecl *C = dyn_cast<CXXConstructorDecl>(D))
+ for (CXXConstructorDecl::init_const_iterator I = C->init_begin(),
+ E = C->init_end();
+ I != E; ++I)
+ dumpCXXCtorInitializer(*I);
+
if (D->doesThisDeclarationHaveABody())
dumpStmt(D->getBody());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55083.175976.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181129/d77d3ea7/attachment.bin>
More information about the cfe-commits
mailing list