diff --git a/flang/lib/Semantics/data-to-inits.cpp b/flang/lib/Semantics/data-to-inits.cpp index 85bce874e78c..fe90e0e58eb4 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{