From 461a67fa15370a9ec88f8f8a240bf7c123bb2029 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:11:37 +0000 Subject: Vendor import of clang trunk r321017: https://llvm.org/svn/llvm-project/cfe/trunk@321017 --- lib/AST/TemplateBase.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'lib/AST/TemplateBase.cpp') diff --git a/lib/AST/TemplateBase.cpp b/lib/AST/TemplateBase.cpp index e4998c37a4ef..e81c11a77825 100644 --- a/lib/AST/TemplateBase.cpp +++ b/lib/AST/TemplateBase.cpp @@ -1,4 +1,4 @@ -//===--- TemplateBase.cpp - Common template AST class implementation ------===// +//===- TemplateBase.cpp - Common template AST class implementation --------===// // // The LLVM Compiler Infrastructure // @@ -14,17 +14,32 @@ #include "clang/AST/TemplateBase.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/PrettyPrinter.h" +#include "clang/AST/TemplateName.h" #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/APSInt.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/ADT/None.h" #include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Casting.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include +#include +#include +#include +#include using namespace clang; @@ -37,7 +52,7 @@ using namespace clang; /// \param Policy the printing policy for EnumConstantDecl printing. static void printIntegral(const TemplateArgument &TemplArg, raw_ostream &Out, const PrintingPolicy& Policy) { - const ::clang::Type *T = TemplArg.getIntegralType().getTypePtr(); + const Type *T = TemplArg.getIntegralType().getTypePtr(); const llvm::APSInt &Val = TemplArg.getAsIntegral(); if (const EnumType *ET = T->getAs()) { @@ -415,10 +430,9 @@ void TemplateArgument::print(const PrintingPolicy &Policy, Out << "..."; break; - case Integral: { + case Integral: printIntegral(*this, Out, Policy); break; - } case Expression: getAsExpr()->printPretty(Out, nullptr, Policy); -- cgit v1.3