[clang] 8f5c338 - [Sema] Use a range-based for loop (NFC) (#144252)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 15 10:32:55 PDT 2025
Author: Kazu Hirata
Date: 2025-06-15T10:32:52-07:00
New Revision: 8f5c338b89a22abc3191a0d931071c09630d6195
URL: https://github.com/llvm/llvm-project/commit/8f5c338b89a22abc3191a0d931071c09630d6195
DIFF: https://github.com/llvm/llvm-project/commit/8f5c338b89a22abc3191a0d931071c09630d6195.diff
LOG: [Sema] Use a range-based for loop (NFC) (#144252)
Note that LLVM Coding Standards discourages for_each.
Added:
Modified:
clang/lib/Sema/SemaOverload.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 49e5a311e239e..8c5f81f126c7a 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -9272,11 +9272,10 @@ class BuiltinOperatorOverloadBuilder {
/// the candidates into a unique set, then move from that set into the list
/// of arithmetic types.
llvm::SmallSetVector<CanQualType, 2> BitIntCandidates;
- llvm::for_each(CandidateTypes, [&BitIntCandidates](
- BuiltinCandidateTypeSet &Candidate) {
+ for (BuiltinCandidateTypeSet &Candidate : CandidateTypes) {
for (QualType BitTy : Candidate.bitint_types())
BitIntCandidates.insert(CanQualType::CreateUnsafe(BitTy));
- });
+ }
llvm::move(BitIntCandidates, std::back_inserter(ArithmeticTypes));
LastPromotedIntegralType = ArithmeticTypes.size();
LastPromotedArithmeticType = ArithmeticTypes.size();
More information about the cfe-commits
mailing list