Skip to content

Commit

Permalink
(clang-tidy): Disable 'modernize-use-designated-initializers'
Browse files Browse the repository at this point in the history
modernize-use-designated-initializers checks for initializer lists that
could be written as designated initializers instead.
See https://clang.llvm.org/extra//clang-tidy/checks/modernize/use-designated-initializers.html

However, this is a C++20 feature. While it can be supported by compilers
before C++20, it is still enabled by default by clang-tidy.

Since designated initializers are not in the standard pre C++20,
and this library supports versions up to including C++20, I would
suggest disabling this check.
  • Loading branch information
fsandhei committed Apr 6, 2024
1 parent edffad0 commit f4cbd47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Checks: '*,
-modernize-concat-nested-namespaces,
-modernize-type-traits,
-modernize-use-constraints,
-modernize-use-designated-initializers,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-performance-enum-size,
Expand Down

0 comments on commit f4cbd47

Please sign in to comment.