From: Stephen Kelly Date: Fri, 18 Jan 2019 22:15:05 +0000 (+0000) Subject: [ASTDump] NFC: Remove redundant condition X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bc8e3364bacffb7b560979eb3dd7926e1b32602;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351604 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index 678a6b5fc8..2b9b132eea 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -514,10 +514,7 @@ void ASTDumper::dumpDecl(const Decl *D) { // Decls within functions are visited by the body. if (!isa(*D) && !isa(*D)) { auto DC = dyn_cast(D); - if (DC && - (DC->hasExternalLexicalStorage() || - (Deserialize ? DC->decls_begin() != DC->decls_end() - : DC->noload_decls_begin() != DC->noload_decls_end()))) + if (DC) dumpDeclContext(DC); } });