Author: Kazu Hirata
Date: 2025-03-28T07:52:43-07:00
New Revision: 43829039c9b00a56847027801ab420cff2031143

URL: 
https://github.com/llvm/llvm-project/commit/43829039c9b00a56847027801ab420cff2031143
DIFF: 
https://github.com/llvm/llvm-project/commit/43829039c9b00a56847027801ab420cff2031143.diff

LOG: [Format] Use a range constructor of DenseSet (NFC) (#133382)

Added: 
    

Modified: 
    clang/lib/Format/MacroCallReconstructor.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/MacroCallReconstructor.cpp 
b/clang/lib/Format/MacroCallReconstructor.cpp
index 101acefdfe7a3..f69a6aabc7d47 100644
--- a/clang/lib/Format/MacroCallReconstructor.cpp
+++ b/clang/lib/Format/MacroCallReconstructor.cpp
@@ -365,9 +365,9 @@ void MacroCallReconstructor::endReconstruction(FormatToken 
*Token) {
 }
 
 void MacroCallReconstructor::debugParentMap() const {
-  llvm::DenseSet<FormatToken *> Values;
-  for (const auto &P : SpelledParentToReconstructedParent)
-    Values.insert(P.second);
+  llvm::DenseSet<FormatToken *> Values(
+      llvm::from_range,
+      llvm::make_second_range(SpelledParentToReconstructedParent));
 
   for (const auto &P : SpelledParentToReconstructedParent) {
     if (Values.contains(P.first))


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to