[clang-tools-extra] [clang-tidy] Avoid diagnosing std::array initializations for modernize-use-designated-initializers (PR #134774)

David Rivera via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 18:46:35 PDT 2025


RiverDave wrote:

> We should fix `IgnoreSingleElementAggregates` instead.

Very good observation I didn't get this detail when investigating this bug. indeed, we shouldn't warn when the 3 conditions you previously mentioned:

> 1) the class is an aggregate and 2) it contains only one member and 3) that member is an array type?

 are true and `IgnoreSingleElementAggregates` is toggled off

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


More information about the cfe-commits mailing list