[clang] acc7a7f - [clang-format] Use range-for loop. NFC.

Marek Kurdej via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 07:02:10 PDT 2022


Author: Marek Kurdej
Date: 2022-03-18T15:01:41+01:00
New Revision: acc7a7f9a17f683b1bbf0a4913ebadb926e1f71b

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

LOG: [clang-format] Use range-for loop. NFC.

Added: 
    

Modified: 
    clang/lib/Format/TokenAnnotator.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 9c94590dc0b9a..b0d48c46340a6 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -4601,8 +4601,8 @@ void TokenAnnotator::printDebugInfo(const AnnotatedLine &Line) {
                  << " BK=" << Tok->getBlockKind() << " P=" << Tok->SplitPenalty
                  << " Name=" << Tok->Tok.getName() << " L=" << Tok->TotalLength
                  << " PPK=" << Tok->getPackingKind() << " FakeLParens=";
-    for (unsigned i = 0, e = Tok->FakeLParens.size(); i != e; ++i)
-      llvm::errs() << Tok->FakeLParens[i] << "/";
+    for (prec::Level LParen : Tok->FakeLParens)
+      llvm::errs() << LParen << "/";
     llvm::errs() << " FakeRParens=" << Tok->FakeRParens;
     llvm::errs() << " II=" << Tok->Tok.getIdentifierInfo();
     llvm::errs() << " Text='" << Tok->TokenText << "'\n";


        


More information about the cfe-commits mailing list