Replace the imperative pattern of the following kind
bool IsTrue = false;
for (Element : Range) {
if (Condition(Element)) {
IsTrue = true;
break;
}
}with functional style llvm::any_of:
bool IsTrue = llvm::any_of(Range, [&](Element) {
return Condition(Element);
});