Skip to content

Commit 6e3f6a3

Browse files
committed
Address feedback from corentin
1 parent 549216e commit 6e3f6a3

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,8 @@ Bug Fixes to C++ Support
907907
(`LWG3929 <https://wg21.link/LWG3929>`__.) (#GH121278)
908908
- Clang now identifies unexpanded parameter packs within the type constraint on a non-type template parameter. (#GH88866)
909909
- Fixed an issue while resolving type of expression indexing into a pack of values of non-dependent type (#GH121242)
910-
- Fixed incorrect construction of template arguments for CTAD alias guides when type constraints are applied. (#GH122134)
910+
- Fixed a crash caused by the incorrect construction of template arguments for CTAD alias guides when type
911+
constraints are applied. (#GH122134)
911912

912913
Bug Fixes to AST Handling
913914
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/lib/Sema/SemaTemplateDeductionGuide.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,13 +1061,14 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
10611061
// f, this ensures all template parameter occurrences are updated
10621062
// correctly.
10631063
//
1064-
// The template argument list is formed from the `DeducedArgs`, two parts:
1065-
// 1) appeared template parameters of alias: transfrom the deduced
1066-
// template argument;
1067-
// 2) non-deduced template parameters of f: rebuild a
1068-
// template argument;
1064+
// The template argument list is formed, in order, from
1065+
// 1) For the template parameters of the alias, the corresponding deduced
1066+
// template arguments
1067+
// 2) For the non-deduced template parameters of f. the
1068+
// (rebuilt) template arguments corresponding.
10691069
//
1070-
// We now perform 1), as case 2) might refer to substituted 1).
1070+
// Note: the non-deduced template arguments of `f` might refer to arguments
1071+
// deduced in 1), as in a type constraint.
10711072
MultiLevelTemplateArgumentList Args;
10721073
Args.setKind(TemplateSubstitutionKind::Rewrite);
10731074
Args.addOuterTemplateArguments(TransformedDeducedAliasArgs);

0 commit comments

Comments
 (0)