-
Notifications
You must be signed in to change notification settings - Fork 1.9k
ci: Run clang tidy checks for each PR #3258
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
ci: Run clang tidy checks for each PR #3258
Conversation
…vowpal_wabbit into jagerrit/clang-tidy
fcc0a09 to
e16a89d
Compare
vowpalwabbit/cbify.cc
Outdated
| csl = std::move(ec.l.cs); | ||
| else | ||
| ld = std::move(ec.l.multi); | ||
| ld = ec.l.multi; |
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.
i guess we don't foresee any changes where this would make a difference?
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.
This resolves the lint of moving a trivially copyable type having no effect. If this object becomes non-trivial where the move would be necessary then this CI will tell us because of the performance-unnecessary-copy-initialization check.
peterychang
left a comment
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.
one nit: If you're gonna remove the std::move calls, maybe add a comment somewhere noting that ec.l.cs contains a vector so std::move is necessary, whereas ec.l.multi is a POD type so its unnecessary
|
That's kind of the point in making this an automated check though - we can enforce that it is done right in case we forget to check the type before copying/moving |
|
Updated to allow for moving trivially copyable types to avoid this confusion. |
Uh oh!
There was an error while loading. Please reload this page.