[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


================
@@ -20,12 +20,8 @@ namespace clang::tidy::readability {
 namespace {
 
 AST_MATCHER(CXXMethodDecl, hasOnlyDefaultParameters) {
-  for (const auto *Param : Node.parameters()) {
-    if (!Param->hasDefaultArg())
-      return false;
-  }
-
-  return true;
+  return llvm::all_of(Node.parameters(),
+                      [](const auto *Param) { return Param->hasDefaultArg(); });
----------------
vbvictor wrote:

Real type

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


More information about the cfe-commits mailing list