Skip to content

[AST] Use llvm::upper_bound (NFC) #139664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:bytecode Issues for the clang bytecode constexpr interpreter labels May 13, 2025
@llvmbot
Copy link
Member

llvmbot commented May 13, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/139664.diff

1 Files Affected:

  • (modified) clang/lib/AST/ByteCode/BitcastBuffer.cpp (+1-2)
diff --git a/clang/lib/AST/ByteCode/BitcastBuffer.cpp b/clang/lib/AST/ByteCode/BitcastBuffer.cpp
index fbd500fd8f5f4..5935de3651a8b 100644
--- a/clang/lib/AST/ByteCode/BitcastBuffer.cpp
+++ b/clang/lib/AST/ByteCode/BitcastBuffer.cpp
@@ -91,8 +91,7 @@ void BitcastBuffer::markInitialized(Bits Offset, Bits Length) {
     InitializedBits.push_back(Element);
   } else {
     // Insert sorted.
-    auto It = std::upper_bound(InitializedBits.begin(), InitializedBits.end(),
-                               Element);
+    auto It = llvm::upper_bound(InitializedBits, Element);
     InitializedBits.insert(It, Element);
   }
 

@kazutakahirata kazutakahirata merged commit 13d80b4 into llvm:main May 13, 2025
13 of 15 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_range_std_upper_bound_clang branch May 13, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:bytecode Issues for the clang bytecode constexpr interpreter clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants