disabled some expensive and/or unnecessary clang-tidy checks (#5660)
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 ```
This commit is contained in:
parent
3bd5a034bd
commit
e7f8985173
|
@ -39,8 +39,11 @@ Checks: >
|
|||
-misc-use-anonymous-namespace,
|
||||
-modernize-avoid-c-arrays,
|
||||
-modernize-deprecated-ios-base-aliases,
|
||||
-modernize-use-nullptr,
|
||||
-misc-include-cleaner,
|
||||
-misc-unused-using-decls,
|
||||
-modernize-loop-convert,
|
||||
-modernize-macro-to-enum,
|
||||
-modernize-raw-string-literal,
|
||||
-modernize-replace-auto-ptr,
|
||||
-modernize-return-braced-init-list,
|
||||
|
|
|
@ -160,6 +160,8 @@ To be evaluated (need to enable explicitly).
|
|||
|
||||
These apply to codebases which use later standards then C++11 (C++17 is used when building with Qt6) so we cannot simply apply them.
|
||||
|
||||
### Disabled for performance reasons
|
||||
|
||||
`portability-std-allocator-const`<br/>
|
||||
|
||||
Only necessary for code which is exclusively compiled with `libc++`. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132.
|
||||
|
@ -183,3 +185,15 @@ We are currently using our own `naming.json` to enforce naming schemes. Also dis
|
|||
`portability-simd-intrinsics`<br/>
|
||||
|
||||
We are not using SIMD instructions and it suggests to use `std::experiemental::` features which might not be commonly available. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132.
|
||||
|
||||
`modernize-macro-to-enum`<br/>
|
||||
|
||||
It does not seem to produce any warnings for us (needs to be investigated) and it is one of the more expensive checks.
|
||||
|
||||
`misc-unused-using-decls`
|
||||
|
||||
This is the most expensive check for several files and it is providing much in terms of code quality. Reported upstream as https://github.com/llvm/llvm-project/issues/72300.
|
||||
|
||||
`modernize-use-nullptr`
|
||||
|
||||
This is already covered by the `-Wzero-as-null-pointer-constant` compiler warning so there is no need for an additional check.
|
Loading…
Reference in New Issue