[PATCH] D150614: [clang-format] Ignore first token when finding MustBreak

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 15 19:02:24 PDT 2023


owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:891-895
+    for (const FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) {
+      // Ignore the first token, because in this situation, it applies more
+      // to the last token of the previous line.
+      if (Tok == Line->First)
+        continue;
----------------
We can start from the second token.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150614



More information about the cfe-commits mailing list