Skip to content

Commit bba477d

Browse files
committed
Merge "merge main into amd-staging" into amd-staging
2 parents 971fd66 + e38b97c commit bba477d

File tree

157 files changed

+7539
-2992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+7539
-2992
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function compute-projects-to-test() {
6868
done
6969
;;
7070
clang)
71-
for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
71+
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
7272
echo $p
7373
done
7474
;;

bolt/include/bolt/Passes/BinaryPasses.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "bolt/Core/BinaryContext.h"
1717
#include "bolt/Core/BinaryFunction.h"
1818
#include "bolt/Core/DynoStats.h"
19+
#include "bolt/Profile/BoltAddressTranslation.h"
1920
#include "llvm/Support/CommandLine.h"
2021
#include <atomic>
2122
#include <set>
@@ -399,8 +400,11 @@ class PrintProfileStats : public BinaryFunctionPass {
399400
/// Prints a list of the top 100 functions sorted by a set of
400401
/// dyno stats categories.
401402
class PrintProgramStats : public BinaryFunctionPass {
403+
BoltAddressTranslation *BAT = nullptr;
404+
402405
public:
403-
explicit PrintProgramStats() : BinaryFunctionPass(false) {}
406+
explicit PrintProgramStats(BoltAddressTranslation *BAT = nullptr)
407+
: BinaryFunctionPass(false), BAT(BAT) {}
404408

405409
const char *getName() const override { return "print-stats"; }
406410
bool shouldPrint(const BinaryFunction &) const override { return false; }

bolt/include/bolt/Passes/StokeInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ struct StokeFuncInfo {
8787
<< "," << NumBlocks << "," << IsLoopFree << "," << NumLoops << ","
8888
<< MaxLoopDepth << "," << HotSize << "," << TotalSize << ","
8989
<< Score << "," << HasCall << ",\"{ ";
90-
for (std::string S : DefIn)
90+
for (const std::string &S : DefIn)
9191
Outfile << "%" << S << " ";
9292
Outfile << "}\",\"{ ";
93-
for (std::string S : LiveOut)
93+
for (const std::string &S : LiveOut)
9494
Outfile << "%" << S << " ";
9595
Outfile << "}\"," << HeapOut << "," << StackOut << "," << HasRipAddr
9696
<< "," << Omitted << "\n";

bolt/lib/Passes/BinaryPasses.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,9 +1390,19 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
13901390
if (Function.isPLTFunction())
13911391
continue;
13921392

1393+
// Adjustment for BAT mode: the profile for BOLT split fragments is combined
1394+
// so only count the hot fragment.
1395+
const uint64_t Address = Function.getAddress();
1396+
bool IsHotParentOfBOLTSplitFunction = !Function.getFragments().empty() &&
1397+
BAT && BAT->isBATFunction(Address) &&
1398+
!BAT->fetchParentAddress(Address);
1399+
13931400
++NumRegularFunctions;
13941401

1395-
if (!Function.isSimple()) {
1402+
// In BOLTed binaries split functions are non-simple (due to non-relocation
1403+
// mode), but the original function is known to be simple and we have a
1404+
// valid profile for it.
1405+
if (!Function.isSimple() && !IsHotParentOfBOLTSplitFunction) {
13961406
if (Function.hasProfile())
13971407
++NumNonSimpleProfiledFunctions;
13981408
continue;

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ Error DataAggregator::readProfile(BinaryContext &BC) {
613613
if (std::error_code EC = writeBATYAML(BC, opts::SaveProfile))
614614
report_error("cannot create output data file", EC);
615615
}
616-
BC.logBOLTErrorsAndQuitOnFatal(PrintProgramStats().runOnFunctions(BC));
616+
PrintProgramStats PPS(BAT);
617+
BC.logBOLTErrorsAndQuitOnFatal(PPS.runOnFunctions(BC));
617618
}
618619

619620
return Error::success();

bolt/runtime/instr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,6 @@ void Graph::computeEdgeFrequencies(const uint64_t *Counters,
12451245
continue;
12461246

12471247
assert(SpanningTreeNodes[Cur].NumInEdges == 1, "must have 1 parent");
1248-
const uint32_t Parent = SpanningTreeNodes[Cur].InEdges[0].Node;
12491248
const uint32_t ParentEdge = SpanningTreeNodes[Cur].InEdges[0].ID;
12501249

12511250
// Calculate parent edge freq.
@@ -1464,9 +1463,8 @@ void visitCallFlowEntry(CallFlowHashTable::MapEntry &Entry, int FD,
14641463
int openProfile() {
14651464
// Build the profile name string by appending our PID
14661465
char Buf[BufSize];
1467-
char *Ptr = Buf;
14681466
uint64_t PID = __getpid();
1469-
Ptr = strCopy(Buf, __bolt_instr_filename, BufSize);
1467+
char *Ptr = strCopy(Buf, __bolt_instr_filename, BufSize);
14701468
if (__bolt_instr_use_pid) {
14711469
Ptr = strCopy(Ptr, ".", BufSize - (Ptr - Buf + 1));
14721470
Ptr = intToStr(Ptr, PID, 10);

bolt/test/X86/bolt-address-translation-yaml.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ RUN: perf2bolt %t.out --pa -p %p/Inputs/blarge_new_bat.preagg.txt -w %t.yaml -o
3131
RUN: 2>&1 | FileCheck --check-prefix READ-BAT-CHECK %s
3232
RUN: FileCheck --input-file %t.yaml --check-prefix YAML-BAT-CHECK %s
3333
# Check that YAML converted from fdata matches YAML created directly with BAT.
34-
RUN: llvm-bolt %t.exe -data %t.fdata -w %t.yaml-fdata -o /dev/null
34+
RUN: llvm-bolt %t.exe -data %t.fdata -w %t.yaml-fdata -o /dev/null \
35+
RUN: 2>&1 | FileCheck --check-prefix READ-BAT-FDATA-CHECK %s
3536
RUN: FileCheck --input-file %t.yaml-fdata --check-prefix YAML-BAT-CHECK %s
3637

3738
# Test resulting YAML profile with the original binary (no-stale mode)
@@ -45,6 +46,8 @@ WRITE-BAT-CHECK: BOLT-INFO: BAT section size (bytes): 384
4546
READ-BAT-CHECK-NOT: BOLT-ERROR: unable to save profile in YAML format for input file processed by BOLT
4647
READ-BAT-CHECK: BOLT-INFO: Parsed 5 BAT entries
4748
READ-BAT-CHECK: PERF2BOLT: read 79 aggregated LBR entries
49+
READ-BAT-CHECK: BOLT-INFO: 5 out of 21 functions in the binary (23.8%) have non-empty execution profile
50+
READ-BAT-FDATA-CHECK: BOLT-INFO: 5 out of 16 functions in the binary (31.2%) have non-empty execution profile
4851

4952
YAML-BAT-CHECK: functions:
5053
# Function not covered by BAT - has insns in basic block

clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ AST_MATCHER(QualType, isEnableIf) {
5454
AST_MATCHER_P(TemplateTypeParmDecl, hasDefaultArgument,
5555
clang::ast_matchers::internal::Matcher<QualType>, TypeMatcher) {
5656
return Node.hasDefaultArgument() &&
57-
TypeMatcher.matches(Node.getDefaultArgument(), Finder, Builder);
57+
TypeMatcher.matches(
58+
Node.getDefaultArgument().getArgument().getAsType(), Finder,
59+
Builder);
5860
}
5961
AST_MATCHER(TemplateDecl, hasAssociatedConstraints) {
6062
return Node.hasAssociatedConstraints();

clang-tools-extra/clang-tidy/bugprone/IncorrectEnableIfCheck.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ namespace {
1919
AST_MATCHER_P(TemplateTypeParmDecl, hasUnnamedDefaultArgument,
2020
ast_matchers::internal::Matcher<TypeLoc>, InnerMatcher) {
2121
if (Node.getIdentifier() != nullptr || !Node.hasDefaultArgument() ||
22-
Node.getDefaultArgumentInfo() == nullptr)
22+
Node.getDefaultArgument().getArgument().isNull())
2323
return false;
2424

25-
TypeLoc DefaultArgTypeLoc = Node.getDefaultArgumentInfo()->getTypeLoc();
25+
TypeLoc DefaultArgTypeLoc =
26+
Node.getDefaultArgument().getTypeSourceInfo()->getTypeLoc();
2627
return InnerMatcher.matches(DefaultArgTypeLoc, Finder, Builder);
2728
}
2829

clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ matchTrailingTemplateParam(const FunctionTemplateDecl *FunctionTemplate) {
177177
dyn_cast<TemplateTypeParmDecl>(LastParam)) {
178178
if (LastTemplateParam->hasDefaultArgument() &&
179179
LastTemplateParam->getIdentifier() == nullptr) {
180-
return {matchEnableIfSpecialization(
181-
LastTemplateParam->getDefaultArgumentInfo()->getTypeLoc()),
182-
LastTemplateParam};
180+
return {
181+
matchEnableIfSpecialization(LastTemplateParam->getDefaultArgument()
182+
.getTypeSourceInfo()
183+
->getTypeLoc()),
184+
LastTemplateParam};
183185
}
184186
}
185187
return {};

clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ static const NamedDecl *getFailureForNamedDecl(const NamedDecl *ND) {
123123
if (const auto *Method = dyn_cast<CXXMethodDecl>(ND)) {
124124
if (const CXXMethodDecl *Overridden = getOverrideMethod(Method))
125125
Canonical = cast<NamedDecl>(Overridden->getCanonicalDecl());
126+
else if (const FunctionTemplateDecl *Primary = Method->getPrimaryTemplate())
127+
if (const FunctionDecl *TemplatedDecl = Primary->getTemplatedDecl())
128+
Canonical = cast<NamedDecl>(TemplatedDecl->getCanonicalDecl());
126129

127130
if (Canonical != ND)
128131
return Canonical;

clang-tools-extra/clangd/Hover.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ fetchTemplateParameters(const TemplateParameterList *Params,
247247
if (!TTP->getName().empty())
248248
P.Name = TTP->getNameAsString();
249249

250-
if (TTP->hasDefaultArgument())
251-
P.Default = TTP->getDefaultArgument().getAsString(PP);
250+
if (TTP->hasDefaultArgument()) {
251+
P.Default.emplace();
252+
llvm::raw_string_ostream Out(*P.Default);
253+
TTP->getDefaultArgument().getArgument().print(PP, Out,
254+
/*IncludeType=*/false);
255+
}
252256
} else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
253257
P.Type = printType(NTTP, PP);
254258

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ Changes in existing checks
375375
<clang-tidy/checks/readability/identifier-naming>` check in `GetConfigPerFile`
376376
mode by resolving symbolic links to header files. Fixed handling of Hungarian
377377
Prefix when configured to `LowerCase`. Added support for renaming designated
378-
initializers. Added support for renaming macro arguments.
378+
initializers. Added support for renaming macro arguments. Fixed renaming
379+
conflicts arising from out-of-line member function template definitions.
379380

380381
- Improved :doc:`readability-implicit-bool-conversion
381382
<clang-tidy/checks/readability/implicit-bool-conversion>` check to provide
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// RUN: %check_clang_tidy %s readability-identifier-naming %t -std=c++20 \
2+
// RUN: --config='{CheckOptions: { \
3+
// RUN: readability-identifier-naming.MethodCase: CamelCase, \
4+
// RUN: }}'
5+
6+
namespace SomeNamespace {
7+
namespace Inner {
8+
9+
class SomeClass {
10+
public:
11+
template <typename T>
12+
int someMethod();
13+
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for method 'someMethod' [readability-identifier-naming]
14+
// CHECK-FIXES: {{^}} int SomeMethod();
15+
};
16+
template <typename T>
17+
int SomeClass::someMethod() {
18+
// CHECK-FIXES: {{^}}int SomeClass::SomeMethod() {
19+
return 5;
20+
}
21+
22+
} // namespace Inner
23+
24+
void someFunc() {
25+
Inner::SomeClass S;
26+
S.someMethod<int>();
27+
// CHECK-FIXES: {{^}} S.SomeMethod<int>();
28+
}
29+
30+
} // namespace SomeNamespace

clang/include/clang/AST/ASTNodeTraverser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class ASTNodeTraverser
695695
if (const auto *TC = D->getTypeConstraint())
696696
Visit(TC->getImmediatelyDeclaredConstraint());
697697
if (D->hasDefaultArgument())
698-
Visit(D->getDefaultArgument(), SourceRange(),
698+
Visit(D->getDefaultArgument().getArgument(), SourceRange(),
699699
D->getDefaultArgStorage().getInheritedFrom(),
700700
D->defaultArgumentWasInherited() ? "inherited from" : "previous");
701701
}

clang/include/clang/AST/DeclTemplate.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ class TemplateTypeParmDecl final : public TypeDecl,
11851185

11861186
/// The default template argument, if any.
11871187
using DefArgStorage =
1188-
DefaultArgStorage<TemplateTypeParmDecl, TypeSourceInfo *>;
1188+
DefaultArgStorage<TemplateTypeParmDecl, TemplateArgumentLoc *>;
11891189
DefArgStorage DefaultArgument;
11901190

11911191
TemplateTypeParmDecl(DeclContext *DC, SourceLocation KeyLoc,
@@ -1225,13 +1225,9 @@ class TemplateTypeParmDecl final : public TypeDecl,
12251225
bool hasDefaultArgument() const { return DefaultArgument.isSet(); }
12261226

12271227
/// Retrieve the default argument, if any.
1228-
QualType getDefaultArgument() const {
1229-
return DefaultArgument.get()->getType();
1230-
}
1231-
1232-
/// Retrieves the default argument's source information, if any.
1233-
TypeSourceInfo *getDefaultArgumentInfo() const {
1234-
return DefaultArgument.get();
1228+
const TemplateArgumentLoc &getDefaultArgument() const {
1229+
static const TemplateArgumentLoc NoneLoc;
1230+
return DefaultArgument.isSet() ? *DefaultArgument.get() : NoneLoc;
12351231
}
12361232

12371233
/// Retrieves the location of the default argument declaration.
@@ -1244,9 +1240,8 @@ class TemplateTypeParmDecl final : public TypeDecl,
12441240
}
12451241

12461242
/// Set the default argument for this template parameter.
1247-
void setDefaultArgument(TypeSourceInfo *DefArg) {
1248-
DefaultArgument.set(DefArg);
1249-
}
1243+
void setDefaultArgument(const ASTContext &C,
1244+
const TemplateArgumentLoc &DefArg);
12501245

12511246
/// Set that this default argument was inherited from another
12521247
/// parameter.

clang/include/clang/AST/RecursiveASTVisitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ DEF_TRAVERSE_DECL(TemplateTypeParmDecl, {
19601960
TRY_TO(TraverseType(QualType(D->getTypeForDecl(), 0)));
19611961
TRY_TO(TraverseTemplateTypeParamDeclConstraints(D));
19621962
if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
1963-
TRY_TO(TraverseTypeLoc(D->getDefaultArgumentInfo()->getTypeLoc()));
1963+
TRY_TO(TraverseTemplateArgumentLoc(D->getDefaultArgument()));
19641964
})
19651965

19661966
DEF_TRAVERSE_DECL(TypedefDecl, {

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def err_invalid_vector_long_double_decl_spec : Error<
310310
def err_invalid_vector_complex_decl_spec : Error<
311311
"cannot use '_Complex' with '__vector'">;
312312
def warn_vector_long_decl_spec_combination : Warning<
313-
"Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
313+
"use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
314314

315315
def err_redeclaration_different_type : Error<
316316
"redeclaration of %0 with a different type%diff{: $ vs $|}1,2">;
@@ -3975,7 +3975,7 @@ def warn_acquired_before : Warning<
39753975
"%0 '%1' must be acquired before '%2'">,
39763976
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
39773977
def warn_acquired_before_after_cycle : Warning<
3978-
"Cycle in acquired_before/after dependencies, starting with '%0'">,
3978+
"cycle in acquired_before/after dependencies, starting with '%0'">,
39793979
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
39803980

39813981

@@ -8003,9 +8003,9 @@ def warn_deprecated_altivec_src_compat : Warning<
80038003
InGroup<DiagGroup<"deprecated-altivec-src-compat">>;
80048004

80058005
def warn_deprecated_lax_vec_conv_all : Warning<
8006-
"Implicit conversion between vector types ('%0' and '%1') is deprecated. "
8007-
"In the future, the behavior implied by '-fno-lax-vector-conversions' "
8008-
"will be the default.">,
8006+
"implicit conversion between vector types ('%0' and '%1') is deprecated; "
8007+
"in the future, the behavior implied by '-fno-lax-vector-conversions' "
8008+
"will be the default">,
80098009
InGroup<DiagGroup<"deprecate-lax-vec-conv-all">>;
80108010

80118011
def err_catch_incomplete_ptr : Error<

clang/include/clang/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2814,7 +2814,7 @@ class Parser : public CodeCompletionHandler {
28142814
SourceLocation CorrectLocation);
28152815

28162816
void stripTypeAttributesOffDeclSpec(ParsedAttributes &Attrs, DeclSpec &DS,
2817-
Sema::TagUseKind TUK);
2817+
TagUseKind TUK);
28182818

28192819
// FixItLoc = possible correct location for the attributes
28202820
void ProhibitAttributes(ParsedAttributes &Attrs,

clang/include/clang/Sema/Sema.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ enum class CheckedConversionKind {
447447
ForBuiltinOverloadedOp
448448
};
449449

450+
enum class TagUseKind {
451+
Reference, // Reference to a tag: 'struct foo *X;'
452+
Declaration, // Fwd decl of a tag: 'struct foo;'
453+
Definition, // Definition of a tag: 'struct foo { int X; } Y;'
454+
Friend // Friend declaration: 'friend struct foo;'
455+
};
456+
450457
/// Sema - This implements semantic analysis and AST building for C.
451458
/// \nosubgrouping
452459
class Sema final : public SemaBase {
@@ -3168,13 +3175,6 @@ class Sema final : public SemaBase {
31683175
bool isDefinition, SourceLocation NewTagLoc,
31693176
const IdentifierInfo *Name);
31703177

3171-
enum TagUseKind {
3172-
TUK_Reference, // Reference to a tag: 'struct foo *X;'
3173-
TUK_Declaration, // Fwd decl of a tag: 'struct foo;'
3174-
TUK_Definition, // Definition of a tag: 'struct foo { int X; } Y;'
3175-
TUK_Friend // Friend declaration: 'friend struct foo;'
3176-
};
3177-
31783178
enum OffsetOfKind {
31793179
// Not parsing a type within __builtin_offsetof.
31803180
OOK_Outside,
@@ -10076,7 +10076,9 @@ class Sema final : public SemaBase {
1007610076

1007710077
bool SubstTemplateArgument(const TemplateArgumentLoc &Input,
1007810078
const MultiLevelTemplateArgumentList &TemplateArgs,
10079-
TemplateArgumentLoc &Output);
10079+
TemplateArgumentLoc &Output,
10080+
SourceLocation Loc = {},
10081+
const DeclarationName &Entity = {});
1008010082
bool
1008110083
SubstTemplateArguments(ArrayRef<TemplateArgumentLoc> Args,
1008210084
const MultiLevelTemplateArgumentList &TemplateArgs,

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6495,7 +6495,8 @@ bool ASTContext::isSameDefaultTemplateArgument(const NamedDecl *X,
64956495
if (!TTPX->hasDefaultArgument() || !TTPY->hasDefaultArgument())
64966496
return false;
64976497

6498-
return hasSameType(TTPX->getDefaultArgument(), TTPY->getDefaultArgument());
6498+
return hasSameType(TTPX->getDefaultArgument().getArgument().getAsType(),
6499+
TTPY->getDefaultArgument().getArgument().getAsType());
64996500
}
65006501

65016502
if (auto *NTTPX = dyn_cast<NonTypeTemplateParmDecl>(X)) {

clang/lib/AST/ASTImporter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5917,11 +5917,11 @@ ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) {
59175917
}
59185918

59195919
if (D->hasDefaultArgument()) {
5920-
Expected<TypeSourceInfo *> ToDefaultArgOrErr =
5921-
import(D->getDefaultArgumentInfo());
5920+
Expected<TemplateArgumentLoc> ToDefaultArgOrErr =
5921+
import(D->getDefaultArgument());
59225922
if (!ToDefaultArgOrErr)
59235923
return ToDefaultArgOrErr.takeError();
5924-
ToD->setDefaultArgument(*ToDefaultArgOrErr);
5924+
ToD->setDefaultArgument(ToD->getASTContext(), *ToDefaultArgOrErr);
59255925
}
59265926

59275927
return ToD;

clang/lib/AST/DeclPrinter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,8 @@ void DeclPrinter::VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *TTP) {
18831883

18841884
if (TTP->hasDefaultArgument()) {
18851885
Out << " = ";
1886-
Out << TTP->getDefaultArgument().getAsString(Policy);
1886+
TTP->getDefaultArgument().getArgument().print(Policy, Out,
1887+
/*IncludeType=*/false);
18871888
}
18881889
}
18891890

0 commit comments

Comments
 (0)