https://bugs.llvm.org/show_bug.cgi?id=49883

            Bug ID: 49883
           Summary: missing-braces warning for empty aggregates inhering
                    from aggregates
           Product: clang
           Version: 11.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

I'm creating a tagged array by inheriting from std::array, and I'm getting
warning missing-braces:

https://compiler-explorer.com/z/Eshjs8Eaz

```
#include <array>
#include <type_traits>

struct tagged_array: std::array<int, 4> { };

static_assert(std::is_aggregate_v<tagged_array>);

void foo() {
    [[maybe_unused]] tagged_array t{1,2,3,4};
}
```

GCC and MSVC are fine without any warning here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to