You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improved modernize-use-default-member-init check by matching arithmetic operations, constexpr and static values, and detecting explicit casting of built-in types within member list initialization.
/home/tmgarn/workspace/reproducer/test.h:7:12: error: use default member initializer for 'member' [modernize-use-default-member-init,-warnings-as-errors]
7 | int32_t member;
| ^
| {CONSTANT}
1 warning treated as error
If you use -fix, it will incorrectly apply this change, but since the constant is defined in the cpp file, the code will not build. Many times you would not want to move the constant to the header, so this should at least be a configurable part of the check.