[PATCH] D150452: [clang-format] Recognize nested blocks

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 12 08:37:25 PDT 2023


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

Now a block gets recognized as a block if it contains a block.

The special cases we added don't have additional tests because they
are already tested for example in FormatTest.FormatsLambdas and
FormatTestJS.ContainerLiterals.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150452

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150452.521660.patch
Type: text/x-patch
Size: 6946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230512/292a5dd5/attachment.bin>


More information about the cfe-commits mailing list