Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

Identified with llvm-use-ranges.

Identified with llvm-use-ranges.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Nov 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Identified with llvm-use-ranges.


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

2 Files Affected:

  • (modified) clang/lib/Frontend/CompilerInvocation.cpp (+3-4)
  • (modified) clang/utils/TableGen/NeonEmitter.cpp (+4-7)
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 2e027934a8db6..be7239da55cce 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -852,10 +852,9 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate,
   // Compares two lists of arguments.
   auto Equal = [](const ArrayRef<const char *> A,
                   const ArrayRef<const char *> B) {
-    return std::equal(A.begin(), A.end(), B.begin(), B.end(),
-                      [](const char *AElem, const char *BElem) {
-                        return StringRef(AElem) == StringRef(BElem);
-                      });
+    return llvm::equal(A, B, [](const char *AElem, const char *BElem) {
+      return StringRef(AElem) == StringRef(BElem);
+    });
   };
 
   // If we generated different arguments from what we assume are two
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index 89891fd9310e9..51a90cb16751c 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -2233,13 +2233,10 @@ NeonEmitter::areRangeChecksCompatible(const ArrayRef<ImmCheck> ChecksA,
   // the same. The element types may differ as they will be resolved
   // per-intrinsic as overloaded types by SemaArm.cpp, though the vector sizes
   // are not and so must be the same.
-  bool compat =
-      std::equal(ChecksA.begin(), ChecksA.end(), ChecksB.begin(), ChecksB.end(),
-                 [](const auto &A, const auto &B) {
-                   return A.getImmArgIdx() == B.getImmArgIdx() &&
-                          A.getKind() == B.getKind() &&
-                          A.getVecSizeInBits() == B.getVecSizeInBits();
-                 });
+  bool compat = llvm::equal(ChecksA, ChecksB, [](const auto &A, const auto &B) {
+    return A.getImmArgIdx() == B.getImmArgIdx() && A.getKind() == B.getKind() &&
+           A.getVecSizeInBits() == B.getVecSizeInBits();
+  });
 
   return compat;
 }

@kazutakahirata kazutakahirata merged commit 637299e into llvm:main Nov 22, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251122_clang_tidy_llvm-use-ranges_clang branch November 22, 2025 23:32
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
Identified with llvm-use-ranges.
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
Identified with llvm-use-ranges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants