Skip to content

Commit 4382903

Browse files
[Format] Use a range constructor of DenseSet (NFC) (#133382)
1 parent 9ce7725 commit 4382903

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Format/MacroCallReconstructor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ void MacroCallReconstructor::endReconstruction(FormatToken *Token) {
365365
}
366366

367367
void MacroCallReconstructor::debugParentMap() const {
368-
llvm::DenseSet<FormatToken *> Values;
369-
for (const auto &P : SpelledParentToReconstructedParent)
370-
Values.insert(P.second);
368+
llvm::DenseSet<FormatToken *> Values(
369+
llvm::from_range,
370+
llvm::make_second_range(SpelledParentToReconstructedParent));
371371

372372
for (const auto &P : SpelledParentToReconstructedParent) {
373373
if (Values.contains(P.first))

0 commit comments

Comments
 (0)