[PATCH] D56643: NFC: Move Decl node handling to TextNodeDumper
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 14 05:58:54 PST 2019
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from some minor nits.
================
Comment at: lib/AST/ASTDumper.cpp:518
+ NodeDumper.Visit(D);
if (!D) {
return;
----------------
Elide braces.
================
Comment at: lib/AST/TextNodeDumper.cpp:239
+ OS << " in " << M->getFullModuleName();
+ if (auto *ND = dyn_cast<NamedDecl>(D))
+ for (Module *M : D->getASTContext().getModulesWithMergedDefinition(
----------------
`const auto *` (which helps to clarify the `const_cast<>` below.)
================
Comment at: lib/AST/TextNodeDumper.cpp:243
+ AddChild([=] { OS << "also in " << M->getFullModuleName(); });
+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
+ if (ND->isHidden())
----------------
`const auto *`
================
Comment at: lib/AST/TextNodeDumper.cpp:248-251
+ if (D->isUsed())
+ OS << " used";
+ else if (D->isThisDeclarationReferenced())
+ OS << " referenced";
----------------
Surround these with newlines for visual clarity.
================
Comment at: lib/AST/TextNodeDumper.cpp:254
+ OS << " invalid";
+ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
+ if (FD->isConstexpr())
----------------
`const auto *`
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56643/new/
https://reviews.llvm.org/D56643
More information about the cfe-commits
mailing list