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

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 12:27:05 PST 2022


owenpan updated this revision to Diff 410365.
owenpan marked an inline comment as done.
owenpan added a comment.

If the line immediately following `// clang-format off` is a line comment, `assert(!Token->Finalized)` will fail. Fixed it and updated the corresponding unit test.


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

https://reviews.llvm.org/D120217

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Format/Format.h
  clang/lib/Format/Format.cpp
  clang/lib/Format/FormatToken.h
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120217.410365.patch
Type: text/x-patch
Size: 17284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220221/b6cf29ee/attachment-0001.bin>


More information about the cfe-commits mailing list