Running clang-tidy with `--enable-check-profile` provides an overview of
the run-time of each check. This revealed some checks which take a
considerable amount of time which could be disabled.
Here's the times for the checks in question. The times are very similar
across most files:
```
---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
...
0.4531 ( 4.7%) 0.3906 ( 6.1%) 0.8438 ( 5.2%) 0.8127 ( 5.1%) misc-unused-using-decls
...
0.3281 ( 3.4%) 0.2344 ( 3.7%) 0.5625 ( 3.5%) 0.4509 ( 2.8%) modernize-macro-to-enum
...
0.2188 ( 2.2%) 0.2031 ( 3.2%) 0.4219 ( 2.6%) 0.3621 ( 2.3%) modernize-use-nullptr
```
When building with /Od - default cmake debug build for me, the
__assume(false); trick does not work to get rid of the C4714 warnings
https://godbolt.org/z/a6xGnfP7d
D:\tmp\cppcheck\lib\keywords.cpp(205): warning C4715:
'Keywords::getOnly': not all control paths return a value
D:\tmp\cppcheck\lib\keywords.cpp(226): warning C4715:
'Keywords::getOnly': not all control paths return a value
D:\tmp\cppcheck\lib\keywords.cpp(168): warning C4715:
'Keywords::getAll': not all control paths return a value
D:\tmp\cppcheck\lib\keywords.cpp(188): warning C4715:
'Keywords::getAll': not all control paths return a value
Proposed fix: also define NORETURN to [[noreturn]] when according to
__has_cpp_attribute [[noreturn]] is supported
https://en.cppreference.com/w/cpp/feature_test
(For previous discussion see also
https://github.com/danmar/cppcheck/pull/5497)
As we now fail early on loading of all libraries we no longer need to
explicitly bail out on mandatory ones. This would have also caused
`libraries` and `library` to go out-of-sync and possibly lead to
duplicated loading of the library. It also allows for a
`CppCheckExecutor` to be made private.
Moved the `FileSettings` out of the `Settings` and pass them around
explicitly. They can never be specified at the same time and are used
exclusively. The code hasn't been fully adjusted to reflect this as this
is only the refactoring without any functional changes.
Updates for the Qt 6.2.x and 6.5.x LTS versions are only being provided
to commercial customers so the latest version is the only feasible one
to use.
Builds with older 6.x versions are still being tested implicitly by
using the Qt versions provided by the various distros.