-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enabled and mitigated readability-const-return-type
clang-tidy warnings
#5644
Conversation
0956a56
to
6586d00
Compare
6586d00
to
9b5a688
Compare
Still need to file upstream tickets about the false positive and lacking context:
|
gui/projectfiledialog.cpp
Outdated
@@ -772,6 +772,7 @@ void ProjectFileDialog::addSingleSuppression(const Suppressions::Suppression &su | |||
void ProjectFileDialog::setSuppressions(const QList<Suppressions::Suppression> &suppressions) | |||
{ | |||
mUI->mListSuppressions->clear(); | |||
// NOLINTNEXTLINE(readability-const-return-type) - neeeds to be a copy since it might be a reference to mSuppressions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no return type on that line, so what does clang-tidy warn about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Maybe yet another false positive in this check. Although it is a valid warning and possibly even a false negative on our side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like the NOLINT should be for performance-unnecessary-copy-initialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it would report that warning and we would not suppress it correctly the CI would fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but unmatched NOLINTs don't seem to cause a warning: llvm/llvm-project#69674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - this is unrelated. Will revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
9b5a688
to
6bfcc81
Compare
I filed llvm/llvm-project#73270 about the missing context. |
No description provided.