Skip to content

Commit 57a5c75

Browse files
kazutakahirataakuhlens
authored andcommitted
[Sema] Use a range-based for loop (NFC) (llvm#144252)
Note that LLVM Coding Standards discourages for_each.
1 parent df67f27 commit 57a5c75

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/Sema/SemaOverload.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9272,11 +9272,10 @@ class BuiltinOperatorOverloadBuilder {
92729272
/// the candidates into a unique set, then move from that set into the list
92739273
/// of arithmetic types.
92749274
llvm::SmallSetVector<CanQualType, 2> BitIntCandidates;
9275-
llvm::for_each(CandidateTypes, [&BitIntCandidates](
9276-
BuiltinCandidateTypeSet &Candidate) {
9275+
for (BuiltinCandidateTypeSet &Candidate : CandidateTypes) {
92779276
for (QualType BitTy : Candidate.bitint_types())
92789277
BitIntCandidates.insert(CanQualType::CreateUnsafe(BitTy));
9279-
});
9278+
}
92809279
llvm::move(BitIntCandidates, std::back_inserter(ArithmeticTypes));
92819280
LastPromotedIntegralType = ArithmeticTypes.size();
92829281
LastPromotedArithmeticType = ArithmeticTypes.size();

0 commit comments

Comments
 (0)