================
@@ -136,11 +136,9 @@ getRepresentation(const std::vector<llvm::StringRef> 
&Config,
 template <typename T>
 static bool isAnyOperatorEnabled(const std::vector<llvm::StringRef> &Config,
                                  const T &Operators) {
-  for (const auto &[traditional, alternative] : Operators) {
-    if (!getRepresentation(Config, traditional, alternative).empty())
-      return true;
-  }
-  return false;
+  return llvm::any_of(Operators, [&](const auto &Op) {
+    return !getRepresentation(Config, Op.first, Op.second).empty();
+  });
----------------
vbvictor wrote:

Arguably less readability than `for (const auto &[traditional, alternative] : 
Operators)`

https://github.com/llvm/llvm-project/pull/167134
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to