Use std::ranges::any_of instead of std::any_of (#4539)

This is suggested by clang-tidy's modernize checks, and is a safer
coding practice.
This commit is contained in:
Dana Jansens
2024-11-15 19:51:21 +00:00
committed by GitHub
parent 1d8c7ffe89
commit 9112053cee
+2 -2
View File
@@ -787,8 +787,8 @@ auto CompileSubcommand::Run(DriverEnv& driver_env) -> DriverResult {
}
// Unlike previous steps, errors block further progress.
if (std::any_of(units.begin(), units.end(),
[&](const auto& unit) { return !unit->success(); })) {
if (std::ranges::any_of(units,
[&](const auto& unit) { return !unit->success(); })) {
CARBON_VLOG_TO(driver_env.vlog_stream,
"*** Stopping before lowering due to errors ***");
return make_result();