diff options
author | A. Jiang <de34@live.cn> | 2024-11-28 09:19:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-28 09:19:02 +0800 |
commit | 63c5a422f07da9925a4700f54016ab8623567718 (patch) | |
tree | 54b26b5c38d9a4c261eb49d7f645770d3ff64301 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | d2b482b0efd1d523852c9add8ed6b2035ce1acd9 (diff) | |
download | llvm-63c5a422f07da9925a4700f54016ab8623567718.zip llvm-63c5a422f07da9925a4700f54016ab8623567718.tar.gz llvm-63c5a422f07da9925a4700f54016ab8623567718.tar.bz2 |
[Clang] Fix constexpr-ness on implicitly deleted destructors (#116359)
In C++20, a defaulted but implicitly deleted destructor is constexpr if
and only if the class has no virtual base class. This hasn't been
changed in C++23 by P2448R2.
Constexpr-ness on a deleted destructor affects almost nothing. The
`__is_literal` intrinsic is related, while the corresponding
`std::is_literal_type(_v)` utility has been removed in C++20. A recently
added example in `test/AST/ByteCode/cxx23.cpp` will become valid, and
the example is already accepted by GCC.
Clang currently behaves correctly in C++23 mode, because the
constexpr-ness on defaulted destructor is relaxed by P2448R2. But we
should make similar relaxation for an implicitly deleted destructor.
Fixes #85550.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions