[llvm] [llvm] Prefer StringRef::substr(0, N) to slice(0, N) (NFC) (PR #113793)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 27 13:13:37 PDT 2024
MaskRay wrote:
> Please wait for feedback on [discourse.llvm.org/t/migrating-llvm-stringref-to-std-string-view/82785/2](https://discourse.llvm.org/t/migrating-llvm-stringref-to-std-string-view/82785/2)
While the broader discussion of StringRef migration or string_view integration is debatable, this specific member function migration seems reasonable. The substr function is well-established and widely understood, making this patch a worthwhile improvement. There is certainly some churn cost associated with such patches, but I believe it's acceptable in this case.
https://github.com/llvm/llvm-project/pull/113793
More information about the llvm-commits
mailing list