]> granicus.if.org Git - clang/commit
clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.
authorDaniel Jasper <djasper@google.com>
Tue, 27 Oct 2015 12:38:37 +0000 (12:38 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 27 Oct 2015 12:38:37 +0000 (12:38 +0000)
commit6e0ab6e4991d372184ddb33f3feff24c604c33ef
treeaafa9916e19f51aea3499a2679cfe02451f6d2ba
parent11ee3485f60c821b117e8673ae40b2c8572e4f19
clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

Summary:
If this option is set, clang-format will always insert a line wrap, e.g.
before the first parameter of a function call unless all parameters fit
on the same line. This obviates the need to make a decision on the
alignment itself.

Use this style for Google's JavaScript style and add some minor tweaks
to correctly handle nested blocks etc. with it. Don't use this option
for for/while loops.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D14104

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