[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 27 12:03:20 PDT 2025


================
@@ -224,3 +224,22 @@ std::array a{1,2,3};
 std::array<int,2> b{10, 11};
 using array = std::array<int, 2>;
 array c{10, 11};
+
----------------
vbvictor wrote:

I think this still needs case like `S18 s183{.a=1, .b=2} // no warning at all`
Probably good to have one nested like
```cpp
struct S20 {
    int i;
    S17 s;
};

S20 s201 {1, 2};
```

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


More information about the cfe-commits mailing list