diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp b/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp index de72ea5..d8118cb 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp @@ -19,7 +19,6 @@ #include "clang/AST/RecordLayout.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/Diagnostic.h" -#include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" #include "llvm/Support/Path.h" #include "llvm/Support/Timer.h" @@ -371,6 +370,26 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, break; } + case Decl::ClassTemplateSpecialization: { + const auto *CTSD = cast<ClassTemplateSpecializationDecl>(DC); + if (CTSD->isCompleteDefinition()) + Out << "[class template specialization] "; + else + Out << "<class template specialization> "; + Out << *CTSD; + break; + } + + case Decl::ClassTemplatePartialSpecialization: { + const auto *CTPSD = cast<ClassTemplatePartialSpecializationDecl>(DC); + if (CTPSD->isCompleteDefinition()) + Out << "[class template partial specialization] "; + else + Out << "<class template partial specialization> "; + Out << *CTPSD; + break; + } + default: llvm_unreachable("a decl that inherits DeclContext isn't handled"); } @@ -401,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<DeclContext>(I); PrintDeclContext(DC, Indentation+2); break; @@ -479,6 +499,37 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, Out << "<omp threadprivate> " << '"' << I << "\"\n"; break; } + case Decl::Friend: { + Out << "<friend>"; + if (const NamedDecl *ND = cast<FriendDecl>(I)->getFriendDecl()) + Out << ' ' << *ND; + Out << "\n"; + break; + } + case Decl::Using: { + Out << "<using> " << *cast<UsingDecl>(I) << "\n"; + break; + } + case Decl::UsingShadow: { + Out << "<using shadow> " << *cast<UsingShadowDecl>(I) << "\n"; + break; + } + case Decl::Empty: { + Out << "<empty>\n"; + break; + } + case Decl::AccessSpec: { + Out << "<access specifier>\n"; + break; + } + case Decl::VarTemplate: { + Out << "<var template> " << *cast<VarTemplateDecl>(I) << "\n"; + break; + } + case Decl::StaticAssert: { + Out << "<static assert>\n"; + break; + } default: Out << "DeclKind: " << DK << '"' << I << "\"\n"; llvm_unreachable("decl unhandled"); |