cppcheck
cppcheck copied to clipboard
Suggestion for a new checker - Check Different Variables Types
Severity: Style
This checker checks whether there is an operation or an assignment of a variable represented by more bytes, in a variable represented by fewer bytes.
It is possible for implicit conversions to lose information.
The checker works according to the the following ladder -
For example for the following line -
long long var2 = 0;
int var1 = var2;
the checker will notify the user.

there are CI failures you can look at.
Still no reply after more than six months - closing.