diff --git a/clang/include/clang/AST/PrettyPrinter.h b/clang/include/clang/AST/PrettyPrinter.h index 38d122db0749..f6816e938f2a 100644 --- a/clang/include/clang/AST/PrettyPrinter.h +++ b/clang/include/clang/AST/PrettyPrinter.h @@ -75,7 +75,7 @@ struct PrintingPolicy { MSVCFormatting(false), ConstantsAsWritten(false), SuppressImplicitBase(false), FullyQualifiedName(false), PrintCanonicalTypes(false), PrintInjectedClassNameWithArguments(true), - UsePreferredNames(true), UseIntegerTypeSuffixesAlways(false) {} + UsePreferredNames(true), AlwaysIncludeTypeForTemplateArgument(false) {} /// Adjust this printing policy for cases where it's known that we're /// printing C++ code (for instance, if AST dumping reaches a C++-only @@ -280,7 +280,7 @@ struct PrintingPolicy { /// Whether to use type suffixes (eg: 1U) on integral non-type template /// parameters. - unsigned UseIntegerTypeSuffixesAlways : 1; + unsigned AlwaysIncludeTypeForTemplateArgument : 1; /// Callbacks to use to allow the behavior of printing to be customized. const PrintingCallbacks *Callbacks = nullptr; diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 10f7155fcb96..223f06b9db1c 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -204,7 +204,7 @@ bool TemplateParameterList::hasAssociatedConstraints() const { bool TemplateParameterList::shouldIncludeTypeForArgument( const PrintingPolicy &Policy, const TemplateParameterList *TPL, unsigned Idx) { - if (!TPL || Idx >= TPL->size() || Policy.UseIntegerTypeSuffixesAlways) + if (!TPL || Idx >= TPL->size() || Policy.AlwaysIncludeTypeForTemplateArgument) return true; const NamedDecl *TemplParam = TPL->getParam(Idx); if (const auto *ParamValueDecl = diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 1ce56f98e1f0..af651e6f44b7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -247,7 +247,7 @@ PrintingPolicy CGDebugInfo::getPrintingPolicy() const { PP.SuppressInlineNamespace = false; PP.PrintCanonicalTypes = true; PP.UsePreferredNames = false; - PP.UseIntegerTypeSuffixesAlways = true; + PP.AlwaysIncludeTypeForTemplateArgument = true; // Apply -fdebug-prefix-map. PP.Callbacks = &PrintCB;