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

[DocDB] Find and fix clang-tidy use-after-move errors #20435

Open
1 task done
SrivastavaAnubhav opened this issue Jan 3, 2024 · 0 comments
Open
1 task done

[DocDB] Find and fix clang-tidy use-after-move errors #20435

SrivastavaAnubhav opened this issue Jan 3, 2024 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/low Low priority

Comments

@SrivastavaAnubhav
Copy link
Contributor

SrivastavaAnubhav commented Jan 3, 2024

Jira Link: DB-9435

Description

cland-tidy is able to detect use-after-move errors with the bugprone-use-after-move. We should find and fix these.

NB: This check is very slow (~30s per file).

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@SrivastavaAnubhav SrivastavaAnubhav added area/docdb YugabyteDB core features priority/low Low priority labels Jan 3, 2024
@SrivastavaAnubhav SrivastavaAnubhav self-assigned this Jan 3, 2024
@yugabyte-ci yugabyte-ci added the kind/bug This issue is a bug label Jan 3, 2024
SrivastavaAnubhav added a commit that referenced this issue Jan 9, 2024
Summary:
This diff fixes some variables that are used after a call to `std::move`, as detected by cland-tidy's bugprone-use-after-move-check. Intentional use after move is tagged with NOLINT.

NB: This check is very slow (~30s per file).
Jira: DB-9435

Test Plan:
You must build the ccmds database to use the ccmd tool, otherwise it will pass and say the file has no errors.
```
ybd --clang17 --ccmds
bin/ccmd  --regex='.*[.]cc' clang-tidy --checks=bugprone-use-after-move >& use-after-move.txt
```

Reviewers: amitanand, rsami, xCluster, hsunder

Reviewed By: rsami, hsunder

Subscribers: yql, ycdcxcluster, esheng, skumar, timur, ybase, bogdan

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D31415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants