[PATCH] D133093: [clang-format] Fix a bug in merging blocks with a wrapped l_brace

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 17:22:58 PDT 2022


owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:716
+    auto IsCtrlStmt = [](const auto &Line) {
+      return Line.First->isOneOf(tok::kw_if, tok::kw_else, tok::kw_while,
+                                 tok::kw_do, tok::kw_for, TT_ForEachMacro);
----------------
HazardyKnusperkeks wrote:
> switch?
It wasn't in the list, and I don't think it should be. We can add it in a separate patch if the need for merging `switch` statements ever arises.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133093



More information about the cfe-commits mailing list