[PATCH] D120217: [clang-format] Add an option to insert braces after control statements

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 00:09:38 PST 2022


curdeius accepted this revision.
curdeius added a comment.

LGTM!



================
Comment at: clang/lib/Format/Format.cpp:1850
+      for (FormatToken *Token = Line->First; Token; Token = Token->Next) {
+        if (Token->Finalized || Token->BraceCount == 0)
+          continue;
----------------
I think that we can skip the whole line if the first token on line is finalized.


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

https://reviews.llvm.org/D120217



More information about the cfe-commits mailing list