Better coverage for -dump-record-layouts and -print-decl-contexts.

llvm-svn: 92441
This commit is contained in:
Eli Friedman 2010-01-03 02:01:11 +00:00
parent 50f6aa11cf
commit c6f59b1c49
3 changed files with 16 additions and 0 deletions

View File

@ -408,6 +408,19 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
Out << "<function template> " << FTD->getNameAsString() << "\n";
break;
}
case Decl::FileScopeAsm: {
Out << "<file-scope asm>\n";
break;
}
case Decl::UsingDirective: {
Out << "<using directive>\n";
break;
}
case Decl::NamespaceAlias: {
NamespaceAliasDecl* NAD = cast<NamespaceAliasDecl>(*I);
Out << "<namespace alias> " << NAD->getNameAsString() << "\n";
break;
}
default:
Out << "DeclKind: " << DK << '"' << I->getDeclKindName() << "\"\n";
assert(0 && "decl unhandled");

View File

@ -2,5 +2,6 @@
// RUN: %clang_cc1 -ast-print %s
// RUN: %clang_cc1 -ast-dump %s
// RUN: %clang_cc1 -ast-print-xml -o %t %s
// RUN: %clang_cc1 -print-decl-contexts %s
#include "c-language-features.inc"

View File

@ -2,5 +2,7 @@
// RUN: %clang_cc1 -ast-print %s
// RUN: %clang_cc1 -ast-dump %s
// FIXME: %clang_cc1 -ast-print-xml -o %t %s
// RUN: %clang_cc1 -print-decl-contexts %s
// RUN: %clang_cc1 -dump-record-layouts %s
#include "cxx-language-features.inc"