From 0c75eea8f661a82866688fd1fc4465883c4dd7d5 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 4 Jan 2017 22:11:23 +0000 Subject: Vendor import of clang trunk r291012: https://llvm.org/svn/llvm-project/cfe/trunk@291012 --- lib/Frontend/ASTConsumers.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'lib/Frontend/ASTConsumers.cpp') diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp index bd2ee06d1653c..d8118cb30f631 100644 --- a/lib/Frontend/ASTConsumers.cpp +++ b/lib/Frontend/ASTConsumers.cpp @@ -370,6 +370,26 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, break; } + case Decl::ClassTemplateSpecialization: { + const auto *CTSD = cast(DC); + if (CTSD->isCompleteDefinition()) + Out << "[class template specialization] "; + else + Out << " "; + Out << *CTSD; + break; + } + + case Decl::ClassTemplatePartialSpecialization: { + const auto *CTPSD = cast(DC); + if (CTPSD->isCompleteDefinition()) + Out << "[class template partial specialization] "; + else + Out << " "; + Out << *CTPSD; + break; + } + default: llvm_unreachable("a decl that inherits DeclContext isn't handled"); } @@ -400,7 +420,8 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, case Decl::CXXConstructor: case Decl::CXXDestructor: case Decl::CXXConversion: - { + case Decl::ClassTemplateSpecialization: + case Decl::ClassTemplatePartialSpecialization: { DeclContext* DC = cast(I); PrintDeclContext(DC, Indentation+2); break; @@ -478,6 +499,37 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, Out << " " << '"' << I << "\"\n"; break; } + case Decl::Friend: { + Out << ""; + if (const NamedDecl *ND = cast(I)->getFriendDecl()) + Out << ' ' << *ND; + Out << "\n"; + break; + } + case Decl::Using: { + Out << " " << *cast(I) << "\n"; + break; + } + case Decl::UsingShadow: { + Out << " " << *cast(I) << "\n"; + break; + } + case Decl::Empty: { + Out << "\n"; + break; + } + case Decl::AccessSpec: { + Out << "\n"; + break; + } + case Decl::VarTemplate: { + Out << " " << *cast(I) << "\n"; + break; + } + case Decl::StaticAssert: { + Out << "\n"; + break; + } default: Out << "DeclKind: " << DK << '"' << I << "\"\n"; llvm_unreachable("decl unhandled"); -- cgit v1.3