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
making clang-tidy work properly again #3664
Conversation
- All of bugprone except: - bugprone-assert-side-effect - bugprone-exception-escape - bugprone-forward-declaration-namespace - bugprone-macro-parentheses - Removing removed tests
casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead [bugprone-incorrect-roundings,-warnings-as-errors]
casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead [bugprone-incorrect-roundings,-warnings-as-errors]
…ve constructors [bugprone-forwarding-reference-overload]
@@ -3,11 +3,19 @@ | |||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | |||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |||
|
|||
Checks: '-*,modernize-use-nullptr,misc-use-after-move,misc-virtual-near-miss,misc-multiple-statement-macro,misc-move-constructor-init,misc-move-forwarding-reference,misc-assert-side-effect,misc-dangling-handle,misc-non-copyable-objects,misc-forwarding-reference-overload,misc-unused-raii' |
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.
Are all of the misc-*
checks (except for misc-non-copyable-objects
) part of bugprone-*
now?
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.
yes
@@ -132,7 +132,7 @@ int hpx_main(variables_map& vm) | |||
HPX_TEST(!any1.empty()); | |||
any any2(std::move(any1)); | |||
HPX_TEST(!any2.empty()); | |||
HPX_TEST(any1.empty()); | |||
HPX_TEST(any1.empty()); // NOLINT |
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 warnings did this cause?
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.
use after move, which this code is explicitly testing for.
@@ -133,7 +133,7 @@ namespace hpx { namespace util | |||
"[hpx]", | |||
"location = ${HPX_LOCATION:$[system.prefix]}", | |||
"component_paths = ${HPX_COMPONENT_PATHS}", | |||
"component_base_paths = $[hpx.location]" | |||
"component_base_paths = $[hpx.location]" // NOLINT |
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 warning did this cause?
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.
use after move, which this code is explicitly testing for.
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.
The one in tests/unit/util/any.cpp
I get, but this? No test 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.
grr, sorry. actually readin where you commented helps ;)
This was:
/home/heller/programming/hpx/src/util/runtime_configuration.cpp:136:13: error: suspicious string literal, probably missing a comma [bugprone-suspicious-missing-comma,-warnings-as-errors]
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, looks good!
This PR makes sure that the code is properly checked with the below enabled checks:
This PR includes the fixes that appeared.