Skip to content
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

Address clang16 use after move #11018

Merged

Conversation

michael-redpanda
Copy link
Contributor

@michael-redpanda michael-redpanda commented May 24, 2023

clang-tidy-16 reported a number of false positive 'use-after-move' errors. This PR addresses those

This appears to be a false-positive, as indicated here: llvm/llvm-project#59612

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • None

The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
…pics_frontend.cc

The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
…patcher

The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
src/v/cluster/topics_frontend.cc Outdated Show resolved Hide resolved
src/v/raft/consensus.cc Outdated Show resolved Hide resolved
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
…r_backend.cc

The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
@michael-redpanda michael-redpanda marked this pull request as ready for review May 25, 2023 01:38
@michael-redpanda michael-redpanda added this to the v23.2.1 milestone May 25, 2023
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

The use of NOLINTBEGIN/NOLINTEND comments is an alternative to copying
`opts` that may degrade performance.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
The motivation for this was because `clang-tidy` was throwing a possible
false-positive use-after-move.

Signed-off-by: Michael Boquard <[email protected]>
Signed-off-by: Michael Boquard <[email protected]>
Copy link
Member

@BenPope BenPope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

append_topic_configs(ctx, response);
}

co_return co_await ctx.respond(response);
Copy link
Member

@BenPope BenPope May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could move response. (but this refactor is correct)

@dotnwat dotnwat merged commit b69e523 into redpanda-data:dev May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants