[PATCH] D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 01:29:28 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.

If a do-while loop is in the block of a control statement, do not remove the braces.

Also updates the unit tests to match the updated LLVM Coding Standards. (See D126512 <https://reviews.llvm.org/D126512>.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126758

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: D126758.433308.patch
Type: text/x-patch
Size: 8756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220601/0cb1cd4f/attachment-0001.bin>


More information about the cfe-commits mailing list