Skip to content

Commit 796d5a8

Browse files
[ADT] Use a range-based for loop instead of llvm::for_each (NFC) (#149542)
LLVM Coding Standards discourages llvm::for_each unless we already have a callable.
1 parent 3ea6da5 commit 796d5a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/ADT/CombinationGenerator.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ class CombinationGenerator {
118118
: VariablesChoices(VariablesChoices_) {
119119
#ifndef NDEBUG
120120
assert(!VariablesChoices.empty() && "There should be some variables.");
121-
llvm::for_each(VariablesChoices, [](ArrayRef<choice_type> VariableChoices) {
121+
for (ArrayRef<choice_type> VariableChoices : VariablesChoices)
122122
assert(!VariableChoices.empty() &&
123123
"There must always be some choice, at least a placeholder one.");
124-
});
125124
#endif
126125
}
127126

0 commit comments

Comments
 (0)