[clang-tools-extra] [llvm] [llvm][ADT] Add wrappers to `std::includes` (PR #143297)

Jakub Kuderski via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 9 06:23:23 PDT 2025


================
@@ -1308,7 +1308,7 @@ getMappedRanges(ArrayRef<Range> Indexed, ArrayRef<SymbolRange> Lexed) {
     return std::nullopt;
   }
   // Fast check for the special subset case.
-  if (std::includes(Indexed.begin(), Indexed.end(), Lexed.begin(), Lexed.end()))
+  if (llvm::includes(Indexed, Lexed))
----------------
kuhar wrote:

For ADT changes, we land the API changes separately from their uses/refactoring of existing code. ADT is tricky to get right and we often run into bugs in supported toolchains (like very specific versions of MSVC), so having API changes separately makes it easier to revert changes when this comes up.

Could you split this PR into two and add some very basic unit tests? Just to make sure the arguments are passed in the correct order etc.

https://github.com/llvm/llvm-project/pull/143297


More information about the cfe-commits mailing list