forked from OSchip/llvm-project
Move decl context dumping to TextNodeDumper
Summary: Only an obscure case is moved. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56829 llvm-svn: 351637
This commit is contained in:
parent
2946cd7010
commit
25f18bfd4f
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue