[all-commits] [llvm/llvm-project] fd8fc5: [clang-tidy] abseil-string-find-startswith: detect...

Dmitri Gribenko via All-commits all-commits at lists.llvm.org
Wed Dec 22 07:50:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd8fc5e8d93849f4a2c8dea087690b1a0e6ea7df
      https://github.com/llvm/llvm-project/commit/fd8fc5e8d93849f4a2c8dea087690b1a0e6ea7df
  Author: Ivan Gerasimov <iger at google.com>
  Date:   2021-12-22 (Wed, 22 Dec 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
    M clang-tools-extra/docs/clang-tidy/checks/abseil-string-find-startswith.rst
    M clang-tools-extra/test/clang-tidy/checkers/abseil-string-find-startswith.cpp

  Log Message:
  -----------
  [clang-tidy] abseil-string-find-startswith: detect `s.rfind(z, 0) == 0`

Suggest converting `std::string::rfind()` calls to `absl::StartsWith()`
where possible.




More information about the All-commits mailing list