[all-commits] [llvm/llvm-project] f1367a: [clang-tidy][modernize-use-starts-ends-with] Add s...

Nicolas van Kempen via All-commits all-commits at lists.llvm.org
Fri Oct 11 18:01:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1367a473d9682a058c7f8c397ed2a787d071826
      https://github.com/llvm/llvm-project/commit/f1367a473d9682a058c7f8c397ed2a787d071826
  Author: Nicolas van Kempen <nvankemp at gmail.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.cpp
    M clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/modernize/use-starts-ends-with.rst
    M clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp

  Log Message:
  -----------
  [clang-tidy][modernize-use-starts-ends-with] Add support for two ends_with patterns (#110448)

Add support for the following two patterns:
```
haystack.compare(haystack.length() - needle.length(), needle.length(), needle) == 0;
haystack.rfind(needle) == (haystack.size() - needle.size());
```



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