[flang-commits] [flang] dc554bd - [flang] Use llvm::any_of (NFC)

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Fri Oct 20 23:45:28 PDT 2023


Author: Kazu Hirata
Date: 2023-10-20T23:45:16-07:00
New Revision: dc554bd06f751e26dccf0f314e6d7daf63dc32bf

URL: https://github.com/llvm/llvm-project/commit/dc554bd06f751e26dccf0f314e6d7daf63dc32bf
DIFF: https://github.com/llvm/llvm-project/commit/dc554bd06f751e26dccf0f314e6d7daf63dc32bf.diff

LOG: [flang] Use llvm::any_of (NFC)

Added: 
    

Modified: 
    flang/lib/Semantics/data-to-inits.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Semantics/data-to-inits.cpp b/flang/lib/Semantics/data-to-inits.cpp
index 85bce874e78cdeb..fe90e0e58eb4803 100644
--- a/flang/lib/Semantics/data-to-inits.cpp
+++ b/flang/lib/Semantics/data-to-inits.cpp
@@ -773,8 +773,7 @@ static bool CombineEquivalencedInitialization(
     return false;
   }
   // If the items are in static storage, save the final initialization.
-  if (std::find_if(associated.begin(), associated.end(),
-          [](SymbolRef ref) { return IsSaved(*ref); }) != associated.end()) {
+  if (llvm::any_of(associated, [](SymbolRef ref) { return IsSaved(*ref); })) {
     // Create a compiler array temp that overlaps all the items.
     SourceName name{exprAnalyzer.context().GetTempName(scope)};
     auto emplaced{


        


More information about the flang-commits mailing list