[clang-tools-extra] [clang-tidy] Avoid diagnosing std::array initializations for modernize-use-designated-initializers (PR #134774)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 28 00:04:23 PDT 2025
carlosgalvezp wrote:
> It can also happen in user defined class.
Yes. But it's unclear what the behavior of the check should be. For `std::array`, it's clear, because one must not touch the internal element. For a user-defined type, "it depends" on how the user wants to design their struct.
If the need comes, I envision we will need some sort of option so people can add other types on top `std::array` to be excluded from the check. But let's cross that bridge when we get there :)
https://github.com/llvm/llvm-project/pull/134774
More information about the cfe-commits
mailing list