[all-commits] [llvm/llvm-project] 1be4c9: [clang-tidy][readability-container-contains] Exten...

Nicolas van Kempen via All-commits all-commits at lists.llvm.org
Wed Sep 18 11:57:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1be4c9710bd09e2f56908ca6cee54cb80ca1774d
      https://github.com/llvm/llvm-project/commit/1be4c9710bd09e2f56908ca6cee54cb80ca1774d
  Author: Nicolas van Kempen <nvankemp at gmail.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.cpp
    M clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/readability/container-contains.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp

  Log Message:
  -----------
  [clang-tidy][readability-container-contains] Extend to any class with contains (#107521)

This check will now work out of the box with other containers that have a
`contains` method, such as `folly::F14` or Abseil containers.

It will also work with strings, which are basically just weird containers.
`std::string` and `std::string_view` will have a `contains` method starting with
C++23. `llvm::StringRef` and `folly::StringPiece` are examples of existing 
implementations with a `contains` method.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list