Closed lucafedeli88 closed 10 months ago
I see that a test case is failing. I will investigate
I see that a test case is failing. I will investigate
The bug should be fixed!
Currently looking through this. The checks are very useful, thank you for adding this!
It seems that in some places the suggested fixes by clang-tidy started an avalanche of recursive fixes and I'm trying to undo those. (Basic pattern: A std::move()
was forgotten or wrongly applied, so clang-tidy suggests to use a const &
argument and that change then propagates through the entire code base)
Feel free to ping either Axel or me when you need to have the CI started
I've taken the freedom to push a commit on this branch that reverts some of the changes and tries to fix the warnings in another way. Most of these were "pass by value" turned into "pass by reference" because of:
std::move
was forgotten or wrongly applied. Fix that instead of changing the function signatures.#ifdef
logic, several implementations may be chosen. Here, we should optimize for the implementations that actually use the parameters since the others are often just there to satisfy the linker.The one thing that is a bit dangerous about clang-tidy imo is that it is very eager to change the API and ABI because of an implementation detail. This is mostly fine since those cases can mostly be handled case-by-case, but one should be aware of it.
One method that seems to successfully trick clang-tidy is to define something like template<typename T> void forget(T){}
and passing unused parameters off into that template. I'll need to add a second commit that puts this in its own header, but not today.
Let's first see what the CI now thinks of this.
EDIT: I seem to have broken some things. Will investigate next week.
Hey @lucafedeli88 The CI is now passing. If you are fine with the changes I did (only in the code, I did not touch the checks), then I would merge this.
EDIT: I forgot one thing, CI needs to run again
Merging this now, thank you for adding this! Since many files are affected, this is likely to cause merge conflicts. But since each single change is mostly rather simple, the single merge conflicts should not be hard to resolve. In doubt, current changes can be replaced by incoming changes, and then clang-tidy suggestions can be reapplied.
This PR adds all the
performance-*
checks toclang-tidy
CI test, namely: