This revision was automatically updated to reflect the committed changes. Closed by commit rC351637: Move decl context dumping to TextNodeDumper (authored by steveire, committed by ).
Changed prior to commit: https://reviews.llvm.org/D56829?vs=182607&id=182669#toc Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56829/new/ https://reviews.llvm.org/D56829 Files: lib/AST/ASTDumper.cpp lib/AST/TextNodeDumper.cpp test/AST/ast-dump-undeserialized.cpp Index: lib/AST/TextNodeDumper.cpp =================================================================== --- lib/AST/TextNodeDumper.cpp +++ lib/AST/TextNodeDumper.cpp @@ -255,6 +255,17 @@ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) if (FD->isConstexpr()) OS << " constexpr"; + + if (!isa<FunctionDecl>(*D)) { + const auto *MD = dyn_cast<ObjCMethodDecl>(D); + if (!MD || !MD->isThisDeclarationADefinition()) { + const auto *DC = dyn_cast<DeclContext>(D); + if (DC && DC->hasExternalLexicalStorage()) { + ColorScope Color(OS, ShowColors, UndeserializedColor); + OS << " <undeserialized declarations>"; + } + } + } } void TextNodeDumper::Visit(const CXXCtorInitializer *Init) { Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -359,13 +359,6 @@ for (auto *D : (Deserialize ? DC->decls() : DC->noload_decls())) dumpDecl(D); - - if (DC->hasExternalLexicalStorage()) { - dumpChild([=] { - ColorScope Color(OS, ShowColors, UndeserializedColor); - OS << "<undeserialized declarations>"; - }); - } } void ASTDumper::dumpLookups(const DeclContext *DC, bool DumpDecls) { Index: test/AST/ast-dump-undeserialized.cpp =================================================================== --- test/AST/ast-dump-undeserialized.cpp +++ test/AST/ast-dump-undeserialized.cpp @@ -1,4 +1,3 @@ // RUN: %clang_cc1 %s -chain-include %s -ast-dump | FileCheck -strict-whitespace %s -// CHECK: TranslationUnitDecl 0x{{.+}} <<invalid sloc>> <invalid sloc> -// CHECK: `-<undeserialized declarations> +// CHECK: TranslationUnitDecl 0x{{.+}} <<invalid sloc>> <invalid sloc> <undeserialized declarations>
Index: lib/AST/TextNodeDumper.cpp =================================================================== --- lib/AST/TextNodeDumper.cpp +++ lib/AST/TextNodeDumper.cpp @@ -255,6 +255,17 @@ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) if (FD->isConstexpr()) OS << " constexpr"; + + if (!isa<FunctionDecl>(*D)) { + const auto *MD = dyn_cast<ObjCMethodDecl>(D); + if (!MD || !MD->isThisDeclarationADefinition()) { + const auto *DC = dyn_cast<DeclContext>(D); + if (DC && DC->hasExternalLexicalStorage()) { + ColorScope Color(OS, ShowColors, UndeserializedColor); + OS << " <undeserialized declarations>"; + } + } + } } void TextNodeDumper::Visit(const CXXCtorInitializer *Init) { Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -359,13 +359,6 @@ for (auto *D : (Deserialize ? DC->decls() : DC->noload_decls())) dumpDecl(D); - - if (DC->hasExternalLexicalStorage()) { - dumpChild([=] { - ColorScope Color(OS, ShowColors, UndeserializedColor); - OS << "<undeserialized declarations>"; - }); - } } void ASTDumper::dumpLookups(const DeclContext *DC, bool DumpDecls) { Index: test/AST/ast-dump-undeserialized.cpp =================================================================== --- test/AST/ast-dump-undeserialized.cpp +++ test/AST/ast-dump-undeserialized.cpp @@ -1,4 +1,3 @@ // RUN: %clang_cc1 %s -chain-include %s -ast-dump | FileCheck -strict-whitespace %s -// CHECK: TranslationUnitDecl 0x{{.+}} <<invalid sloc>> <invalid sloc> -// CHECK: `-<undeserialized declarations> +// CHECK: TranslationUnitDecl 0x{{.+}} <<invalid sloc>> <invalid sloc> <undeserialized declarations>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits