]> granicus.if.org Git - clang/commit
[clang-format] Add SpaceBeforeCpp11BracedList option.
authorHans Wennborg <hans@hanshq.net>
Thu, 14 Jun 2018 08:01:09 +0000 (08:01 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 14 Jun 2018 08:01:09 +0000 (08:01 +0000)
commit590084b80ff2cceeeef9ad8ccb9826f2033f275b
tree84bd7533658d1810d70393478090c2d1e46326a2
parent747fefe4691d4b30b5f9859027f80f69cb9ed01d
[clang-format] Add SpaceBeforeCpp11BracedList option.

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.

Patch by Ross Kirsling!

Differential Revision: https://reviews.llvm.org/D46024

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334692 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp