[all-commits] [llvm/llvm-project] 9d3437: [ADT] [NFC] Add StringRef::detectEOL

Chris B via All-commits all-commits at lists.llvm.org
Fri Jan 21 07:48:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d3437fbf3419502351d41ff9e28f06b0c3f06e8
      https://github.com/llvm/llvm-project/commit/9d3437fbf3419502351d41ff9e28f06b0c3f06e8
  Author: Chris Bieneman <beanz at abolishcrlf.org>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
    M llvm/include/llvm/ADT/StringRef.h
    M llvm/unittests/ADT/StringRefTest.cpp

  Log Message:
  -----------
  [ADT] [NFC] Add StringRef::detectEOL

This change moves EOL detection out of the clang::InclusionRewriter into
llvm::StringRef so that it can be easily reused elsewhere. It also adds
additional explicit test cases to verify the correct and expected return
results.

Reviewed By: dblaikie

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




More information about the All-commits mailing list