[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 8 04:33:05 PST 2025


================
@@ -21,10 +21,7 @@ using llvm::SmallPtrSet;
 
 template <typename S>
 static bool isSetDifferenceEmpty(const S &S1, const S &S2) {
-  for (auto E : S1)
-    if (S2.count(E) == 0)
-      return false;
-  return true;
+  return llvm::all_of(S1, [&](auto E) { return S2.count(E) != 0; });
----------------
vbvictor wrote:

const auto&?

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


More information about the cfe-commits mailing list