llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.31k stars 12.11k forks source link

`bugprone-dangling-handle.HandleClasses` should update its defaults #75685

Open cjdb opened 11 months ago

cjdb commented 11 months ago

In addition to string_view types, std::span, std::ranges::subrange, and all standard library view types should be added.

llvmbot commented 11 months ago

@llvm/issue-subscribers-clang-tidy

Author: Christopher Di Bella (cjdb)

In addition to string_view types, `std::span`, `std::ranges::subrange`, and all standard library view types should be added.
llvmbot commented 11 months ago

Hi!

This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:

  1. In the comments of the issue, request for it to be assigned to you.
  2. Fix the issue locally.
  3. Run the test suite locally. Remember that the subdirectories under test/ create fine-grained testing targets, so you can e.g. use make check-clang-ast to only run Clang's AST tests.
  4. Create a Git commit.
  5. Run git clang-format HEAD~1 to format your changes.
  6. Open a pull request to the upstream repository on GitHub. Detailed instructions can be found in GitHub's documentation.

If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.

llvmbot commented 11 months ago

@llvm/issue-subscribers-good-first-issue

Author: Christopher Di Bella (cjdb)

In addition to string_view types, `std::span`, `std::ranges::subrange`, and all standard library view types should be added.
kannishk commented 11 months ago

@cjdb Can you please elaborate on the specific requirement?

cjdb commented 10 months ago

@cjdb Can you please elaborate on the specific requirement?

Thanks for your interest! Since you're already assigned #75688, I am going to assign this to @maxjtwelftree instead. Having said that, elaborating is still a good idea, so thank you for asking.

bugprone-dangling-handle detects basic_string_view by default, but not other view types like span, mdspan, and the range adaptors found in std::ranges. Since these all have the same problem, bugprone-dangling-handle should look at them by default too.

maxjtwelftree commented 10 months ago

Thank you for assigning me @cjdb excited to contribute.