[all-commits] [llvm/llvm-project] 63c5a4: [Clang] Fix constexpr-ness on implicitly deleted d...
A. Jiang via All-commits
all-commits at lists.llvm.org
Wed Nov 27 17:19:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 63c5a422f07da9925a4700f54016ab8623567718
https://github.com/llvm/llvm-project/commit/63c5a422f07da9925a4700f54016ab8623567718
Author: A. Jiang <de34 at live.cn>
Date: 2024-11-28 (Thu, 28 Nov 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/DeclCXX.h
M clang/lib/AST/DeclCXX.cpp
M clang/test/AST/ByteCode/cxx23.cpp
M clang/test/SemaCXX/literal-type.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list