aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-13 22:46:02 -0800
committerKazu Hirata <kazu@google.com>2023-12-13 22:46:02 -0800
commit5c9d82de6b72cc0c037daecce452c450870f0034 (patch)
tree6df2bfa36033214406a096235985cdde220765b4 /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent2255795f281862b11e22920b982d57787808ecbb (diff)
downloadllvm-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/Support/VirtualFileSystemTest.cpp')
-rw-r--r--llvm/unittests/Support/VirtualFileSystemTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/VirtualFileSystemTest.cpp b/llvm/unittests/Support/VirtualFileSystemTest.cpp
index bd4048f..15f5204 100644
--- a/llvm/unittests/Support/VirtualFileSystemTest.cpp
+++ b/llvm/unittests/Support/VirtualFileSystemTest.cpp
@@ -452,11 +452,11 @@ TEST(VirtualFileSystemTest, BasicRealFSIteration) {
ASSERT_FALSE(EC);
ASSERT_NE(vfs::directory_iterator(), I);
// Check either a or c, since we can't rely on the iteration order.
- EXPECT_TRUE(I->path().endswith("a") || I->path().endswith("c"));
+ EXPECT_TRUE(I->path().ends_with("a") || I->path().ends_with("c"));
I.increment(EC);
ASSERT_FALSE(EC);
ASSERT_NE(vfs::directory_iterator(), I);
- EXPECT_TRUE(I->path().endswith("a") || I->path().endswith("c"));
+ EXPECT_TRUE(I->path().ends_with("a") || I->path().ends_with("c"));
I.increment(EC);
EXPECT_EQ(vfs::directory_iterator(), I);
}