[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

Ross Kirsling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:56:36 PDT 2018


rkirsling created this revision.
rkirsling added reviewers: djasper, klimek.
Herald added a subscriber: cfe-commits.

WebKit C++ style for object initialization is as follows:

  Foo foo { bar };

Yet using `clang-format -style=webkit` changes this to:

  Foo foo{ bar };

As there is no existing combination of rules that will ensure a space before a braced list in this fashion, this patch adds a new SpaceBeforeCpp11BracedList rule.


Repository:
  rC Clang

https://reviews.llvm.org/D46024

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46024.143781.patch
Type: text/x-patch
Size: 7792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180424/83e16842/attachment.bin>


More information about the cfe-commits mailing list