[llvm] [clang-tools-extra] [clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 06:15:12 PST 2024
================
@@ -2765,10 +2765,14 @@ def err_constexpr_tag : Error<
"cannot be marked %sub{select_constexpr_spec_kind}1">;
def err_constexpr_dtor : Error<
"destructor cannot be declared %sub{select_constexpr_spec_kind}0">;
-def err_constexpr_dtor_subobject : Error<
- "destructor cannot be declared %sub{select_constexpr_spec_kind}0 because "
+def ext_constexpr_dtor_subobject : ExtWarn<
+ "destructor cannot be declared %sub{select_constexpr_spec_kind}0 before C++23 because "
"%select{data member %2|base class %3}1 does not have a "
- "constexpr destructor">;
+ "constexpr destructor">, InGroup<CXX23>, DefaultError;
+def warn_cxx23_compat_constexpr_dtor_subobject : ExtWarn<
----------------
AaronBallman wrote:
```suggestion
def warn_cxx23_compat_constexpr_dtor_subobject : Warning<
```
this part isn't an extension, just a regular warning.
https://github.com/llvm/llvm-project/pull/77753
More information about the llvm-commits
mailing list