[clang] [clang] Allow class with anonymous union member to be const-default-constructible even if a union member has a default member initializer (#95854) (PR #96301)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 18:10:32 PDT 2024
================
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+
+struct A {
----------------
shafik wrote:
We should also test this case:
```cpp
struct A {
union {
int n;
int m=0;
};
};
const A a;
```
https://github.com/llvm/llvm-project/pull/96301
More information about the cfe-commits
mailing list