mitigated most clang-tidy warnings in headers#4175
mitigated most clang-tidy warnings in headers#4175danmar merged 4 commits intocppcheck-opensource:mainfrom
Conversation
| * | ||
| * @param hidden true if there are some hidden results, or false if there are not | ||
| */ | ||
| // NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) - caused by generated MOC code |
There was a problem hiding this comment.
there is a cppcheck warning that does not generate this noise. so I suggest we drop this clang-tidy warning.
There was a problem hiding this comment.
I dropped these changes for now.
There was a problem hiding this comment.
@danmar This should be fine to merge now.
|
This should be okay to merge. |
| // Make sure a family flag is set and matches. | ||
| // This works because at most only one flag will be set. | ||
| // NOLINTNEXTLINE(misc-redundant-expression) | ||
| return ((mFlags & fFamilyMask) & (decl.mFlags & fFamilyMask)) != 0; |
There was a problem hiding this comment.
I think it's ok to fix this warning
There was a problem hiding this comment.
It's a false positive. I still need to file a ticket about this.
There was a problem hiding this comment.
I assume it complains that it's redundant to repeat fFamilyMask right? So the fix would be either something like:
return (mFlags & decl.mFlags & fFamilyMask) != 0;
or:
return (mFlags & fFamilyMask) && (decl.mFlags & fFamilyMask);
There was a problem hiding this comment.
I did not look closely at the warning before. It is indeed about the redundant fFamilyMask.
I chose the send suggestion for readability.
I did not enable the headers in
.clang-tidyyet since there are some warnings I am not sure how to suppress. This will be done within #4100.