From: Richard Smith Date: Tue, 22 Oct 2013 23:50:38 +0000 (+0000) Subject: Teach AST dumper to dump the containing module and hidden flag for declarations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=426589aa7a5cbb50e0f69988288414bac7657542;p=clang Teach AST dumper to dump the containing module and hidden flag for declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193210 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index 908099a23a..b869affbbb 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -552,6 +552,8 @@ void ASTDumper::dumpLookups(const DeclContext *DC) { if (RI + 1 == RE) lastChild(); dumpDeclRef(*RI); + if ((*RI)->isHidden()) + OS << " hidden"; } } @@ -740,6 +742,11 @@ void ASTDumper::dumpDecl(const Decl *D) { OS << " parent " << cast(D->getDeclContext()); dumpPreviousDecl(OS, D); dumpSourceRange(D->getSourceRange()); + if (Module *M = D->getOwningModule()) + OS << " in " << M->getFullModuleName(); + if (const NamedDecl *ND = dyn_cast(D)) + if (ND->isHidden()) + OS << " hidden"; bool HasAttrs = D->attr_begin() != D->attr_end(); const FullComment *Comment =