[PATCH] D115067: [clang-format][NFC] Use range based for

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 3 12:51:25 PST 2021


curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2376
 void TokenAnnotator::annotate(AnnotatedLine &Line) {
-  for (SmallVectorImpl<AnnotatedLine *>::iterator I = Line.Children.begin(),
-                                                  E = Line.Children.end();
-       I != E; ++I) {
-    annotate(**I);
-  }
+  for (auto &Child : Line.Children)
+    annotate(*Child);
----------------
Nit: I'd keep the type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115067/new/

https://reviews.llvm.org/D115067



More information about the cfe-commits mailing list