[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 00:27:43 PDT 2025


================
@@ -922,7 +922,7 @@ namespace cwg667 { // cwg667: 8
 
   struct B { ~B() = delete; };
   union C { B b; };
-  static_assert(!__is_trivially_destructible(C), "");
+  static_assert(!__is_trivially_destructible(C), ""); // cxx26-error {{failed}}
----------------
Endilll wrote:

I think I want this static to be duplicated and put under `#if __cplusplus`, because we're not actually interested in "static_assert has failed" diagnostic. 

https://github.com/llvm/llvm-project/pull/146815


More information about the cfe-commits mailing list