Skip to content

Commit 57c5b98

Browse files
committed
- rebase to main
- update err_deduced_non_class_template_specialization_type to include alias templates - update cxx_status.html - fix a typo in ReleaseNotes
1 parent f1ec1e6 commit 57c5b98

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ C++20 Feature Support
9191
current module units.
9292
Fixes `#84002 <https://github.com/llvm/llvm-project/issues/84002>`_.
9393

94-
- Initial support for class template argument deduciton (CTAD) for type alias
94+
- Initial support for class template argument deduction (CTAD) for type alias
9595
templates (`P1814R0 <https://wg21.link/p1814r0>`_).
9696
(#GH54051).
9797

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,10 +2515,11 @@ def err_deduced_class_template_compound_type : Error<
25152515
"cannot %select{form pointer to|form reference to|form array of|"
25162516
"form function returning|use parentheses when declaring variable with}0 "
25172517
"deduced class template specialization type">;
2518-
def err_deduced_non_class_template_specialization_type : Error<
2518+
def err_deduced_non_class_or_alias_template_specialization_type : Error<
25192519
"%select{<error>|function template|variable template|alias template|"
25202520
"template template parameter|concept|template}0 %1 requires template "
2521-
"arguments; argument deduction only allowed for class templates">;
2521+
"arguments; argument deduction only allowed for class templates or alias "
2522+
"templates">;
25222523
def err_deduced_class_template_ctor_ambiguous : Error<
25232524
"ambiguous deduction for template arguments of %0">;
25242525
def err_deduced_class_template_ctor_no_viable : Error<

clang/lib/Sema/SemaInit.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10751,9 +10751,8 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
1075110751
}
1075210752
}
1075310753
if (!Template) {
10754-
// FIXME: update the diagnostic message to include C++20 alias templates
1075510754
Diag(Kind.getLocation(),
10756-
diag::err_deduced_non_class_template_specialization_type)
10755+
diag::err_deduced_non_class_or_alias_template_specialization_type)
1075710756
<< (int)getTemplateNameKindForDiagnostics(TemplateName) << TemplateName;
1075810757
if (auto *TD = TemplateName.getAsTemplateDecl())
1075910758
NoteTemplateLocation(*TD);

clang/www/cxx_status.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,13 @@ <h2 id="cxx20">C++20 implementation status</h2>
843843
<tr>
844844
<td>Class template argument deduction for alias templates</td>
845845
<td><a href="https://wg21.link/p1814r0">P1814R0</a></td>
846-
<td class="none" align="center">No</td>
846+
<td class="partial" align="center">
847+
<details>
848+
<summary>Clang 19 (Partial)</summary>
849+
The associated constraints (over.match.class.deduct#3.3) for the
850+
synthesized deduction guides are not yet implemented.
851+
</details>
852+
</td>
847853
</tr>
848854
<tr>
849855
<td>Permit conversions to arrays of unknown bound</td>

0 commit comments

Comments
 (0)