[PATCH] D125137: [clang-format] Don't remove braces if a 1-statement body would wrap

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 15:27:07 PDT 2022


owenpan created this revision.
owenpan added reviewers: curdeius, HazardyKnusperkeks, MyDeveloperDay.
owenpan added a project: clang-format.
Herald added a project: All.
owenpan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Reimplement the `RemoveBracesLLVM` feature which handles a single-statement block that would get wrapped.

Fixes https://github.com/llvm/llvm-project/issues/53543.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125137

Files:
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125137.427769.patch
Type: text/x-patch
Size: 3880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220506/fbd424fd/attachment.bin>


More information about the cfe-commits mailing list