[all-commits] [llvm/llvm-project] 22e55b: [llvm] Prefer StringRef::substr to StringRef::slic...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Wed Aug 28 01:14:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22e55ba3293f72df84de509db821b4d8a2c4c55e
      https://github.com/llvm/llvm-project/commit/22e55ba3293f72df84de509db821b4d8a2c4c55e
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M llvm/lib/FileCheck/FileCheck.cpp
    M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
    M llvm/unittests/Support/VirtualFileSystemTest.cpp

  Log Message:
  -----------
  [llvm] Prefer StringRef::substr to StringRef::slice (NFC) (#106330)

S.substr(N) is simpler than S.slice(N, StringRef::npos). Also, substr
is probably better recognizable than slice thanks to
std::string_view::substr.



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