diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-13 22:46:02 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-12-13 22:46:02 -0800 |
commit | 5c9d82de6b72cc0c037daecce452c450870f0034 (patch) | |
tree | 6df2bfa36033214406a096235985cdde220765b4 /llvm/unittests/FileCheck/FileCheckTest.cpp | |
parent | 2255795f281862b11e22920b982d57787808ecbb (diff) | |
download | llvm-5c9d82de6b72cc0c037daecce452c450870f0034.zip llvm-5c9d82de6b72cc0c037daecce452c450870f0034.tar.gz llvm-5c9d82de6b72cc0c037daecce452c450870f0034.tar.bz2 |
[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.
Diffstat (limited to 'llvm/unittests/FileCheck/FileCheckTest.cpp')
-rw-r--r-- | llvm/unittests/FileCheck/FileCheckTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |