6 Commits

Author SHA1 Message Date
Danny Mösch
0afb30311d
[clang-tidy] Add handling of type aliases in use-designated-initializers check (#150842)
Resolves #150782.
2025-07-28 07:37:16 +02:00
David Rivera
45411ac895
[clang-tidy] Avoid diagnosing std::array initializations for modernize-use-designated-initializers (#134774)
**Edit:**
I suggest we avoid diagnosing initializers for `std::array` type. The
fixit provided is incorrect as observed in **#133715.** The only
workaround would require C99-style array designators which don’t really
align with the purpose of this check. This would also generate extra
compiler warnings.

Fixes #133715
2025-04-28 20:12:38 +02:00
z1nke
27ef549af2
[clang-tidy] Fix crash in modernize-use-designated-initializers check (#113688)
Fix #113652.

When calling `Node.isAggregate()` and `Node.isPOD()`, if `Node` is declared but
not defined, it will result in null pointer dereference (and if assertions are
enabled, it will cause an assertion failure).
2024-10-29 15:48:39 -04:00
Piotr Zegar
31b84d459c
[clang-tidy] Extend modernize-use-designated-initializers with new options (#94651)
Add StrictCStandardCompliance and StrictCppStandardCompliance options
that default to true.

Closes #83732
2024-06-09 11:53:59 +02:00
Piotr Zegar
21be2fbd17 [clang-tidy][NFC] Fix buffer overflow in modernize-use-designated-initializers
Instance of DenseMap were copied into local variable,
and as a result reference to string stored in that local
variable were returned from function. At the end fix-it
were applied with already destroyed string causing some
non utf-8 characters to be printed.

Related to #80541
2024-02-29 20:53:30 +00:00
Danny Mösch
525fe4492b
[clang-tidy] Add new check modernize-use-designated-initializers (#80541) 2024-02-29 20:48:05 +01:00