diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-13 08:54:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 08:54:13 -0800 |
commit | f3dcc2351cff7b26c9870d737e5d431551542d9e (patch) | |
tree | 31fa2bd937d91cd191045356b5f1ee23316605a3 /clang/lib/Tooling/CompilationDatabase.cpp | |
parent | eaa11526c873b65a9dc0aaf0ebaf66de3db8ed21 (diff) | |
download | llvm-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/lib/Tooling/CompilationDatabase.cpp')
-rw-r--r-- | clang/lib/Tooling/CompilationDatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Tooling/CompilationDatabase.cpp b/clang/lib/Tooling/CompilationDatabase.cpp index fdf6015..87ad8f2 100644 --- a/clang/lib/Tooling/CompilationDatabase.cpp +++ b/clang/lib/Tooling/CompilationDatabase.cpp @@ -204,7 +204,7 @@ public: // which don't support these options. struct FilterUnusedFlags { bool operator() (StringRef S) { - return (S == "-no-integrated-as") || S.startswith("-Wa,"); + return (S == "-no-integrated-as") || S.starts_with("-Wa,"); } }; |