]> granicus.if.org Git - clang/commitdiff
Teach AST dumper to dump the containing module and hidden flag for declarations.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Oct 2013 23:50:38 +0000 (23:50 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Oct 2013 23:50:38 +0000 (23:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193210 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTDumper.cpp

index 908099a23a5f833a90bf47d0c08e852034b376c9..b869affbbb13221b0c8eda0a513e819dc3724497 100644 (file)
@@ -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<Decl>(D->getDeclContext());
   dumpPreviousDecl(OS, D);
   dumpSourceRange(D->getSourceRange());
+  if (Module *M = D->getOwningModule())
+    OS << " in " << M->getFullModuleName();
+  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
+    if (ND->isHidden())
+      OS << " hidden";
 
   bool HasAttrs = D->attr_begin() != D->attr_end();
   const FullComment *Comment =