summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTDumper.cpp7
-rw-r--r--clang/lib/AST/TextNodeDumper.cpp11
2 files changed, 11 insertions, 7 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index a477ee32694..fc33ff331bb 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -359,13 +359,6 @@ void ASTDumper::dumpDeclContext(const DeclContext *DC) {
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) {
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index ca2d6b2d057..06beb77f7a9 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -255,6 +255,17 @@ void TextNodeDumper::Visit(const Decl *D) {
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) {
OpenPOWER on IntegriCloud