From 5c9d82de6b72cc0c037daecce452c450870f0034 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 13 Dec 2023 22:46:02 -0800 Subject: [llvm] Use StringRef::{starts,ends}_with (NFC) This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with. --- llvm/unittests/FileCheck/FileCheckTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/unittests/FileCheck/FileCheckTest.cpp') diff --git a/llvm/unittests/FileCheck/FileCheckTest.cpp b/llvm/unittests/FileCheck/FileCheckTest.cpp index 317fc449..91fce69 100644 --- a/llvm/unittests/FileCheck/FileCheckTest.cpp +++ b/llvm/unittests/FileCheck/FileCheckTest.cpp @@ -172,7 +172,7 @@ struct ExpressionFormatParameterisedFixture } std::string padWithLeadingZeros(StringRef NumStr) const { - bool Negative = NumStr.startswith("-"); + bool Negative = NumStr.starts_with("-"); if (NumStr.size() - unsigned(Negative) >= Precision) return NumStr.str(); -- cgit v1.1