[PATCH] D68346: Clang-format: Add new option to add spaces around conditions

Tim Wojtulewicz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 10:42:56 PDT 2019


timwoj created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This diff adds a new option SpacesAroundConditions that inserts spaces inside the braces for conditional statements. It's used by the Zeek project (https://github.com/zeek/zeek) as described in their style guide (https://github.com/zeek/zeek-docs/blob/master/devel/style_guide.rst#conditional-expressions)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68346

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/include/clang/Format/Format.h
  clang/lib/Format/Format.cpp
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68346.222870.patch
Type: text/x-patch
Size: 5300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191002/24ebb567/attachment.bin>


More information about the cfe-commits mailing list