-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Enable and apply clang-tidy readability and misc fixes. #3052
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
Enable and apply clang-tidy readability and misc fixes. #3052
Conversation
@@ -75,8 +77,10 @@ struct C { | |||
# pragma GCC diagnostic push | |||
# pragma GCC diagnostic ignored "-Wdeprecated" | |||
#endif | |||
int m7(int x) throw() { return x-7; } | |||
int m8(int x) const throw() { return x-8; } | |||
// NOLINTNEXTLINE(modernize-use-noexcept) |
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 check discourages the user of throw, but since these are explicilty deprecated tests, I add nolints to prevent them from being changed.
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.
Thanks Aaron!
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 all looks very good to me! Thanks! Love seeing that someone is finally filling out the clang-tidy checks, see my comment at #2478 (comment) :)
I'm calling this a fix due to the fact that adding const technically is better, as you can only call const methods on a const object. |
Description
There is one readability improvement with const return types I would like to enable but it causes error sadly that need to be fixed.
Suggested changelog entry: