The addition could overflow, the upcast needs to be performed before,
not after.
Fixes all clang-tidy bugprone-misplaced-widening-cast warnings
References #1479
Copy-pasting can often result in mistakes like:
```
if (test_value(x)) {
y++;
do_something(x, y);
} else {
y++;
do_something(x, y);
}
```
Thus it is preferable that branch bodies be unique.
Fixes all clang-tidy bugprone-branch-clone warnings
References #1479
These multiplication could indeed have overflowed, but now they are
performed with a bigger type, matching the type they are ultimately
stored in.
Fixes all clang-tidy bugprone-implicit-widening-of-multiplication-result
warnings
References #1479
Depending on the font, an l suffix can look like a 1. Consider "231l".
Thus prefer uppercase.
Fixes all clang-tidy readability-uppercase-literal-suffix warnings
References #1479
The C langugage reserves various identifiers for itself that user code
must not use.
Fixes all clang-tidy bugprone-reserved-identifier warnings
Also, 4 of 5 file extension tests were case insensitive, and 1 was not.
Changed it to be insensitive too.
References #1479
All checks are enabled except for those that cause any warning.
This is a starting point, some of the currently-suppressed warnings can
be fixed hereafter.
Closes#1434