diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-16 15:02:17 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-12-16 15:02:17 -0800 |
commit | b8f89b84bc26c46a5a10d01eb5414fbde3c8700a (patch) | |
tree | 1a92d49ca73f2fffc44fb407e0b526ae798dcff7 /clang/test/Index | |
parent | ee667db4b83eb6171bbceca1010cddd0da6f17ca (diff) | |
download | llvm-b8f89b84bc26c46a5a10d01eb5414fbde3c8700a.zip llvm-b8f89b84bc26c46a5a10d01eb5414fbde3c8700a.tar.gz llvm-b8f89b84bc26c46a5a10d01eb5414fbde3c8700a.tar.bz2 |
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 'clang/test/Index')
-rw-r--r-- | clang/test/Index/recursive-cxx-member-calls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Index/recursive-cxx-member-calls.cpp b/clang/test/Index/recursive-cxx-member-calls.cpp index be908c5..48fc8f1 100644 --- a/clang/test/Index/recursive-cxx-member-calls.cpp +++ b/clang/test/Index/recursive-cxx-member-calls.cpp @@ -99,7 +99,7 @@ using namespace clang; AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) { llvm::StringRef AttrName = Name->getName(); - if (AttrName.startswith("__") && AttrName.endswith("__")) + if (AttrName.starts_with("__") && AttrName.ends_with("__")) AttrName = AttrName.substr(2, AttrName.size() - 4); return llvm::StringSwitch < AttributeList::Kind > (AttrName) |