llvm-project
[clang-tidy] Add new check `modernize-use-designated-initializers`
#80541
Merged

[clang-tidy] Add new check `modernize-use-designated-initializers` #80541

SimplyDanny
llvmbot llvmbot added clang-tools-extra
llvmbot llvmbot added clang-tidy
llvmbot
PiotrZSL
PiotrZSL requested changes on 2024-02-03
EugeneZelenko
EugeneZelenko commented on 2024-02-03
SimplyDanny SimplyDanny force pushed to c2bb32a2 1 year ago
SimplyDanny
SimplyDanny commented on 2024-02-11
SimplyDanny
EugeneZelenko
EugeneZelenko commented on 2024-02-11
5chmidti
5chmidti requested changes on 2024-02-11
SimplyDanny SimplyDanny requested a review from PiotrZSL PiotrZSL 1 year ago
EugeneZelenko
EugeneZelenko commented on 2024-02-13
PiotrZSL
PiotrZSL commented on 2024-02-13
5chmidti
PiotrZSL
PiotrZSL approved these changes on 2024-02-14
SimplyDanny SimplyDanny force pushed to 7196618f 1 year ago
SimplyDanny SimplyDanny force pushed from 7196618f to 64aebaed 1 year ago
SimplyDanny SimplyDanny force pushed from 64aebaed to 0e4bae42 1 year ago
SimplyDanny SimplyDanny requested a review from 5chmidti 5chmidti 1 year ago
PiotrZSL
PiotrZSL requested changes on 2024-02-20
SimplyDanny SimplyDanny force pushed to 14c991ce 1 year ago
PiotrZSL
PiotrZSL approved these changes on 2024-02-20
SimplyDanny SimplyDanny force pushed to e50677a7 1 year ago
SimplyDanny
SimplyDanny SimplyDanny force pushed to e50677a7 1 year ago
PiotrZSL
SimplyDanny SimplyDanny force pushed 1 year ago
SimplyDanny SimplyDanny force pushed 1 year ago
SimplyDanny
SimplyDanny SimplyDanny force pushed to 0a633d0b 1 year ago
SimplyDanny
SimplyDanny SimplyDanny force pushed from 0a633d0b to ee8488f8 1 year ago
SimplyDanny SimplyDanny force pushed from ee8488f8 to e29f6451 1 year ago
SimplyDanny SimplyDanny force pushed from e29f6451 to 42885d6c 1 year ago
SimplyDanny Trigger on variable declarations
2b58d1b5
SimplyDanny Support nested initializer lists
35708255
SimplyDanny Rename
511ff53e
SimplyDanny Enable for C++20 only
edd2ffd9
SimplyDanny Add option to ignore aggregates with single elements
5311c658
SimplyDanny Test class
ef99af25
SimplyDanny Add documentation and release notes
217b5aa3
SimplyDanny Fix typo
8174277d
SimplyDanny Specify explicit type
66a136b6
SimplyDanny Get only local option
0c22b875
SimplyDanny Improve check description
39441a08
SimplyDanny Move logic into matcher
599b7dfe
SimplyDanny Add template test
6a98ede2
SimplyDanny Ignore types inheriting fields
dcabc571
SimplyDanny Ignore types with anonymous fields
b00c46c3
SimplyDanny Remove restriction to C++ 20
ff051d22
SimplyDanny Add option to restrict check to POD types
ab6232d2
SimplyDanny Add fix-its
118b9136
SimplyDanny Move computation of designated initializers to common place
86868d23
SimplyDanny Fully implement fix-its reusing designated initializer computation fr…
f9e72475
SimplyDanny Separate by empty line
6a03dc6c
SimplyDanny Add test for default-initialized fields
eac967fa
SimplyDanny Fix C++20 style
a82f80e3
SimplyDanny Have custom AST matchers in anonymous namespace
fa3d438e
SimplyDanny Keep public methods public
c2fa7eab
SimplyDanny Rename method
a2695b3d
SimplyDanny Analyze syntactic form only
9075dcf2
SimplyDanny Have separate fixes
9fe89598
SimplyDanny Keep order in release notes
fee15abc
SimplyDanny Use constexpr
27b9a102
SimplyDanny Move after namespace
3f29da4f
SimplyDanny Check for null
72511ea2
SimplyDanny Use llvm::all_of
3ef14a23
SimplyDanny Convert matcher to internal variable
7c7b7921
SimplyDanny Check for unset type
10e474c8
SimplyDanny Mention options for older standards
fb623ad7
SimplyDanny Add -fno-delayed-template-parsing
aa2091cf
SimplyDanny Support inline defined structs and unions
20e3a8ef
SimplyDanny Support anonymous structs and unions
6d2bd287
SimplyDanny Test aggregate in aggregate
5a7ddfcd
SimplyDanny Add test for template values
ea369b37
SimplyDanny Add option to ignore macros
6ea08a81
SimplyDanny Stream full source ranges into diagnostics
cace099f
SimplyDanny Use getLocalOrGlobal for IgnoreMacros option
44fe06f5
SimplyDanny Avoid negation
dab96ac3
SimplyDanny Use llvm::all_of
d86ac9d7
SimplyDanny Reduce nesting level
bb16263f
SimplyDanny Compute designators lazily and exit/continue early
fea9ac2d
SimplyDanny Point to type to initialize
d0e686e0
SimplyDanny Mention type or field name in diagnostic
c719b05f
SimplyDanny Move designator computation to clang-tidy/utils and link it into Clangd
a1b17e05
SimplyDanny Return without block
e97bb92a
SimplyDanny Have safety check for both cases
b49e587f
SimplyDanny Prefer references to avoid performance issues
54198fc5
SimplyDanny Refer to type only
64326163
SimplyDanny Improve type hint
5fc2d3d1
SimplyDanny Use new option format
5081ecbe
SimplyDanny Extract to class to handle missing elements gracefully
3cfce274
SimplyDanny Rename and avoid two calls
906b3380
SimplyDanny Combine diagnostic details aggregation
6cbf8c4f
SimplyDanny Add some doc
cb270ff5
SimplyDanny Make intention clearer
70545587
SimplyDanny Omit placeholder if there is no designator
f83c0a61
SimplyDanny Trim NULL characters
12f1abf5
SimplyDanny Fix, format and reorder documentation
4d6446c3
SimplyDanny SimplyDanny force pushed from 42885d6c to 4d6446c3 1 year ago
SimplyDanny SimplyDanny merged 525fe449 into main 1 year ago
SimplyDanny SimplyDanny deleted the use-designated-initializer branch 1 year ago
PiotrZSL
SimplyDanny
sam-mccall
SimplyDanny
PiotrZSL
sam-mccall

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone