[NFC] Fix clang-tidy issues#1378
Conversation
Separate the Checks into multiple lines for better readability.
Add -llvm-header-guard to silence errors regarding OFFLOADTEST_ being prefixed on the header guards.
Use --header-filter=^${CMAKE_CURRENT_SOURCE_DIR}/.*) to restrict clang-tidy to project source files only.
Co-authored-by: Justin Bogner <mail@justinbogner.com>
bob80905
left a comment
There was a problem hiding this comment.
If the PR builds, then I have no other concerns, LGTM
bogner
left a comment
There was a problem hiding this comment.
This mostly looks fine. I don't particularly like the NOLINT suppression - maybe we should just disable tests that have false positives?
Can't do that because it's a build error and any machine can perform the build for any of the tests. |
…g-tidy versions" This reverts commit e6910ec.
Couldn’t we put |
|
More clang-tidy errors on the builders... I think clang-tidy should just be disabled on the runners.
Can try that. If there are more clang-tidy errors though, I think it'll be better to have clang-tidy off by default. |
|
Merging now since the PR checks have finished and I don't see any more build or clang-tidy issues. |
Modifies the
.clang-tidyto separate the Checks into multiple lines for better readability, adds -llvm-header-guard to silence clang-tidy warnings/errors regardingOFFLOADTEST_prefixes on header guards, and adds-misc-const-correctnessto disable const correctness checks which have false-positives that differ across clang-tidy versionsThe CMakeLists.txt has been modified to pass
--header-filter=^${CMAKE_CURRENT_SOURCE_DIR}/.*)to clang-tidy so that it is restricted to scanning project source files. This prevents clang-tidy from scanning llvm-project headers.All github workflows now specify -DOFFLOADTEST_USE_CLANG_TIDY=ON (except MacOS which does not have clang-tidy).
Code refactoring has been performed to eliminate all clang-tidy warnings/errors from the latest clang-tidy version of 22.1.8
Assisted by: Claude Opus 4.8