[all-commits] [llvm/llvm-project] ae25e2: [clang-tidy] Extract string header from redundant-...

Mike Crowe via All-commits all-commits at lists.llvm.org
Sun Mar 5 09:16:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae25e2f19decb94198301f0726ee613f945cc405
      https://github.com/llvm/llvm-project/commit/ae25e2f19decb94198301f0726ee613f945cc405
  Author: Mike Crowe <mac at mcrowe.com>
  Date:   2023-03-05 (Sun, 05 Mar 2023)

  Changed paths:
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string
    M clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp

  Log Message:
  -----------
  [clang-tidy] Extract string header from redundant-string-cstr checker

In preparation for using the implementation of basic_string and
basic_string_view from redundant-string-cstr.cpp in other checks, let's
extract it to a header.

Using the existing <string.h> to provide size_t, using that to define
size_type and using it rather than the previous "size" type makes it
easier to provide the size() method later and makes the implementation
closer to the standard.

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D144216




More information about the All-commits mailing list