-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[clang-tidy] autofix cppcoreguidelines #1932
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
Conversation
include/benchmark/benchmark.h
Outdated
@@ -1692,7 +1692,7 @@ class BENCHMARK_EXPORT BenchmarkReporter { | |||
CPUInfo const& cpu_info; | |||
SystemInfo const& sys_info; | |||
// The number of chars in the longest benchmark name. | |||
size_t name_field_width; | |||
size_t name_field_width{}; |
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 should probably be =0
;
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.
it would be nice if clang-tidy followed published guidelines (https://abseil.io/tips/88 and https://abseil.io/tips/146). i'll redo the automation here.
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 probably a configuration knob for that, i'd guess. Or maybe not.
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.
so it should now be using the config in .clang-format
(which it wasn't before, so it should be a bit more consistent. hopefully.
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.
Generally really not a fan of zero-init (since it hides genuine issues),
but seems harmless in these cases.
part of #1925