Clang-tidy fixes in header files#4567
Merged
Merged
Conversation
Member
Author
|
Dang, I didn't realize that |
awelzel
reviewed
Jun 11, 2025
awelzel
left a comment
Contributor
There was a problem hiding this comment.
Uff, thanks for doing this all. Had some thoughts and opinions here and there, but feel free to push back. The "random thoughts" are also just things that came in mind looking at the code, so do whatever you like with those :-)
This was referenced Jun 11, 2025
awelzel
reviewed
Jun 12, 2025
awelzel
reviewed
Jun 12, 2025
awelzel
reviewed
Jun 12, 2025
awelzel
approved these changes
Jun 12, 2025
timwoj
force-pushed
the
topic/timw/clang-tidy-fixes
branch
2 times, most recently
from
June 12, 2025 18:53
3bcb78e to
ddf9292
Compare
timwoj
force-pushed
the
topic/timw/clang-tidy-fixes
branch
from
June 12, 2025 20:06
ddf9292 to
5a1eb21
Compare
Member
Author
|
zeek/cmake#137 still needs a review as part of this. |
…rnings in headers
This one is weird. This checker complains because we tend to use PList, which sets the type of T to a pointer. The checker is making note that we're doing sizeof() on a pointer, which always returns the same value every time. It's asking whether we meant to do that, or if we meant to pass the actual type to sizeof.
timwoj
force-pushed
the
topic/timw/clang-tidy-fixes
branch
from
June 23, 2025 15:42
5a1eb21 to
6aa5145
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the last round of clang-tidy fixes, I discovered that it was never configured to cover header files and was only scanning cc files and what little bit of headers that it saw during builds. This PR expands coverage to all of the headers in the Zeek repo, including generated code. It explicitly excludes files from src/3rdparty and broker, and anything that comes from a directory external to the repo itself. It looks like a lot of commits, but most of them are very small. The really huge ones are performance-enum-size and cppcoreguidelines-macro-usage.
This relies on these PRs in other repos: zeek/bifcl#40, zeek/binpac#45, zeek/cmake#137, zeek/gen-zam#17
Sorry this one turned into such a codefist 👊🏼