From c25536e4feed59f8a8685fac3ba225057b76a358 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Fri, 3 Dec 2021 08:47:38 +0100 Subject: [PATCH] [clang-format][NFC] Use range based for That's much easier to read. Differential Revision: https://reviews.llvm.org/D115067 --- clang/lib/Format/TokenAnnotator.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index cc6d066..6b7f135 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2373,11 +2373,9 @@ static unsigned maxNestingDepth(const AnnotatedLine &Line) { } void TokenAnnotator::annotate(AnnotatedLine &Line) { - for (SmallVectorImpl::iterator I = Line.Children.begin(), - E = Line.Children.end(); - I != E; ++I) { - annotate(**I); - } + for (auto &Child : Line.Children) + annotate(*Child); + AnnotatingParser Parser(Style, Line, Keywords); Line.Type = Parser.parseLine(); -- 2.7.4