aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Driver/ToolChainTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-13 08:54:13 -0800
committerGitHub <noreply@github.com>2023-12-13 08:54:13 -0800
commitf3dcc2351cff7b26c9870d737e5d431551542d9e (patch)
tree31fa2bd937d91cd191045356b5f1ee23316605a3 /clang/unittests/Driver/ToolChainTest.cpp
parenteaa11526c873b65a9dc0aaf0ebaf66de3db8ed21 (diff)
downloadllvm-f3dcc2351cff7b26c9870d737e5d431551542d9e.zip
llvm-f3dcc2351cff7b26c9870d737e5d431551542d9e.tar.gz
llvm-f3dcc2351cff7b26c9870d737e5d431551542d9e.tar.bz2
[clang] Use StringRef::{starts,ends}_with (NFC) (#75149)
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 'clang/unittests/Driver/ToolChainTest.cpp')
-rw-r--r--clang/unittests/Driver/ToolChainTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index acbbb87..a9b5f3c 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -531,7 +531,7 @@ TEST(ToolChainTest, CommandOutput) {
const auto &InFile = CmdCompile->getInputInfos().front().getFilename();
EXPECT_STREQ(InFile, "foo.cpp");
auto ObjFile = CmdCompile->getOutputFilenames().front();
- EXPECT_TRUE(StringRef(ObjFile).endswith(".o"));
+ EXPECT_TRUE(StringRef(ObjFile).ends_with(".o"));
const auto &CmdLink = Jobs.getJobs().back();
const auto LinkInFile = CmdLink->getInputInfos().front().getFilename();