[ASTDump] NFC: Remove redundant condition

These conditions are duplicated from the dumpDeclContext function called
within the if(). This is presumably an attempt to avoid calling the
function in the case it will do nothing.

That may have made sense in the past if the code was different, but it
doesn't make sense now.

llvm-svn: 351604
This commit is contained in:
Stephen Kelly 2019-01-18 22:15:05 +00:00
parent f4129fd58b
commit 4e35baa842
1 changed files with 1 additions and 4 deletions

View File

@ -514,10 +514,7 @@ void ASTDumper::dumpDecl(const Decl *D) {
// Decls within functions are visited by the body.
if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
auto DC = dyn_cast<DeclContext>(D);
if (DC &&
(DC->hasExternalLexicalStorage() ||
(Deserialize ? DC->decls_begin() != DC->decls_end()
: DC->noload_decls_begin() != DC->noload_decls_end())))
if (DC)
dumpDeclContext(DC);
}
});