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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 20 14:04:07 PST 2022


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2303
+static FormatToken *getLastNonComment(const UnwrappedLine &Line) {
+  for (const auto &Token : llvm::reverse(Line.Tokens))
+    if (Token.Tok->isNot(tok::comment))
----------------
Get the last token, and if it's a comment `getPreviousNonComment()`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120217



More information about the cfe-commits mailing list