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:
Sylvestre Ledru 2023-10-08 08:52:27 +00:00
parent c17fd37529
commit 7baa783763
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,11 @@
struct S {
S() = default;
S(int i) : i(i) {}
int i = 1;
};
struct F1 {
F1() : f() {}
S f;
};

View File

@ -0,0 +1,8 @@
[
[
"warning",
"initializer for member 'f' is redundant",
"readability-redundant-member-init"
],
{ "reliability": "high" }
]