[PATCH] D56829: Move decl context dumping to TextNodeDumper
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 17 06:23:14 PST 2019
steveire marked an inline comment as done.
steveire added a comment.
I don't know what C++ code results in the `undeserialized declarations` output. Can you suggest some?
================
Comment at: lib/AST/ASTDumper.cpp:519-520
- (DC->hasExternalLexicalStorage() ||
- (Deserialize ? DC->decls_begin() != DC->decls_end()
- : DC->noload_decls_begin() != DC->noload_decls_end())))
dumpDeclContext(DC);
----------------
aaron.ballman wrote:
> Why did this condition get dropped?
The condition is using internal knowledge of the `dumpDeclContext` method - that it doesn't do anything if these conditions are not met, so avoid calling the method in the first place. We can just call the method. The for loop which remains will simply do nothing.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56829/new/
https://reviews.llvm.org/D56829
More information about the cfe-commits
mailing list