mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1857550 - clang-tidy: add test for readability-redundant-member-init r=linter-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D190396
This commit is contained in:
parent
c17fd37529
commit
7baa783763
11
tools/clang-tidy/test/readability-redundant-member-init.cpp
Normal file
11
tools/clang-tidy/test/readability-redundant-member-init.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
struct S {
|
||||
S() = default;
|
||||
S(int i) : i(i) {}
|
||||
int i = 1;
|
||||
};
|
||||
|
||||
struct F1 {
|
||||
F1() : f() {}
|
||||
S f;
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
[
|
||||
[
|
||||
"warning",
|
||||
"initializer for member 'f' is redundant",
|
||||
"readability-redundant-member-init"
|
||||
],
|
||||
{ "reliability": "high" }
|
||||
]
|
Loading…
Reference in New Issue
Block a user