diff options
author | Andrey Ali Khan Bolshakov <32954549+bolshakov-a@users.noreply.github.com> | 2024-01-21 23:28:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-21 21:28:57 +0100 |
commit | 5518a9d7673bfe55b4110bea049140316d032fbf (patch) | |
tree | 0a840b90eac534b6f846b6e19f1c8609b561ee17 /clang/www | |
parent | 30d6806a08f8f453d6389bdfeae4c32e937a9821 (diff) | |
download | llvm-5518a9d7673bfe55b4110bea049140316d032fbf.zip llvm-5518a9d7673bfe55b4110bea049140316d032fbf.tar.gz llvm-5518a9d7673bfe55b4110bea049140316d032fbf.tar.bz2 |
[c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (#78041)
Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and
reverted because a dependency commit was reverted, then committed again
as 4b574008aef5a7235c1f894ab065fe300d26e786 and reverted again because
"dependency commit" 5a391d38ac6c561ba908334d427f26124ed9132e was
reverted. But it doesn't seem that 5a391d38ac6c was a real dependency
for this.
This commit incorporates 4b574008aef5a7235c1f894ab065fe300d26e786 and
18e093faf726d15f210ab4917142beec51848258 by Richard Smith (@zygoloid),
with some minor fixes, most notably:
- `UncommonValue` renamed to `StructuralValue`
- `VK_PRValue` instead of `VK_RValue` as default kind in lvalue and
member pointer handling branch in
`BuildExpressionFromNonTypeTemplateArgumentValue`;
- handling of `StructuralValue` in `IsTypeDeclaredInsideVisitor`;
- filling in `SugaredConverted` along with `CanonicalConverted`
parameter in `Sema::CheckTemplateArgument`;
- minor cleanup in
`TemplateInstantiator::transformNonTypeTemplateParmRef`;
- `TemplateArgument` constructors refactored;
- `ODRHash` calculation for `UncommonValue`;
- USR generation for `UncommonValue`;
- more correct MS compatibility mangling algorithm (tested on MSVC ver.
19.35; toolset ver. 143);
- IR emitting fixed on using a subobject as a template argument when the
corresponding template parameter is used in an lvalue context;
- `noundef` attribute and opaque pointers in `template-arguments` test;
- analysis for C++17 mode is turned off for templates in
`warn-bool-conversion` test; in C++17 and C++20 mode, array reference
used as a template argument of pointer type produces template argument
of UncommonValue type, and
`BuildExpressionFromNonTypeTemplateArgumentValue` makes
`OpaqueValueExpr` for it, and `DiagnoseAlwaysNonNullPointer` cannot see
through it; despite of "These cases should not warn" comment, I'm not
sure about correct behavior; I'd expect a suggestion to replace `if` by
`if constexpr`;
- `temp.arg.nontype/p1.cpp` and `dr18xx.cpp` tests fixed.
Diffstat (limited to 'clang/www')
-rwxr-xr-x | clang/www/cxx_status.html | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 197726f..a48f35e 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -637,13 +637,21 @@ C++23, informally referred to as C++26.</p> </tr> <!-- Rapperswil papers --> <tr> - <td rowspan="2">Class types as non-type template parameters</td> + <td>Class types as non-type template parameters</td> <td><a href="https://wg21.link/p0732r2">P0732R2</a></td> - <td rowspan="2" class="partial" align="center">Partial</td> + <td class="full" align="center">Clang 12</td> + </tr> + <tr> <!-- from Belfast --> + <td>Generalized non-type template parameters of scalar type</td> + <td><a href="https://wg21.link/p1907r1">P1907R1</a></td> + <td class="partial" align="center"> + <details> + <summary>Clang 18 (Partial)</summary> + Reference type template arguments referring to instantiation-dependent objects and subobjects + (i.e. declared inside a template but neither type- nor value-dependent) aren't fully supported. + </details> + </td> </tr> - <tr> <!-- from Belfast --> - <td><a href="https://wg21.link/p1907r1">P1907R1</a></td> - </tr> <tr> <td>Destroying operator delete</td> <td><a href="https://wg21.link/p0722r3">P0722R3</a></td> |