diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2373,11 +2373,9 @@ } 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();