This adds a warning emitted by clang-reorder-fields when the reordering fields breaks dependencies in the initializer list (such that -Wuninitialized would warn when compiling). For example, given:
Foo::Foo(int x)
: a(x)
, b(a) {}Reordering fields to [b,a] gives:
Foo::Foo(int x)
: b(a)
, a(x) {}Emits the warning:
2: Warning: reordering field a after b makes a uninitialized when used in init expression.