aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-10-14 07:15:25 -0700
committerGitHub <noreply@github.com>2025-10-14 07:15:25 -0700
commit324f8d09f8cc676eb8d2faeae9a96c7e0957a3fb (patch)
treea662b68dfeea56766c8d4eab802cc9b4199bee18
parente1daa3ff4f625226476f349b418bc82f547e6115 (diff)
downloadllvm-324f8d09f8cc676eb8d2faeae9a96c7e0957a3fb.zip
llvm-324f8d09f8cc676eb8d2faeae9a96c7e0957a3fb.tar.gz
llvm-324f8d09f8cc676eb8d2faeae9a96c7e0957a3fb.tar.bz2
[clang-format] Use llvm::binary_search (NFC) (#163328)
We can directly pass a range to llvm::binary_search.
-rw-r--r--clang/lib/Format/FormatToken.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index c2956a1..cb3fc1c 100644
--- a/clang/lib/Format/FormatToken.cpp
+++ b/clang/lib/Format/FormatToken.cpp
@@ -41,8 +41,7 @@ static constexpr std::array<StringRef, 14> QtPropertyKeywords = {
bool FormatToken::isQtProperty() const {
assert(llvm::is_sorted(QtPropertyKeywords));
- return std::binary_search(QtPropertyKeywords.begin(),
- QtPropertyKeywords.end(), TokenText);
+ return llvm::binary_search(QtPropertyKeywords, TokenText);
}
// Sorted common C++ non-keyword types.