From 4e35baa842df5cd169456fe3ba0f25a48317b8c9 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 18 Jan 2019 22:15:05 +0000 Subject: [PATCH] [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 --- clang/lib/AST/ASTDumper.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 678a6b5fc851..2b9b132eea7a 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/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); } });