diff --git a/llvm/include/llvm/ADT/CombinationGenerator.h b/llvm/include/llvm/ADT/CombinationGenerator.h index 6100aa9812293..bbdbd9bfa1be3 100644 --- a/llvm/include/llvm/ADT/CombinationGenerator.h +++ b/llvm/include/llvm/ADT/CombinationGenerator.h @@ -118,10 +118,9 @@ class CombinationGenerator { : VariablesChoices(VariablesChoices_) { #ifndef NDEBUG assert(!VariablesChoices.empty() && "There should be some variables."); - llvm::for_each(VariablesChoices, [](ArrayRef VariableChoices) { + for (ArrayRef VariableChoices : VariablesChoices) assert(!VariableChoices.empty() && "There must always be some choice, at least a placeholder one."); - }); #endif }