diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-16 14:59:02 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-16 14:59:02 +0000 |
commit | 0df6acdf4f6faf7579775a739e1c09448c076c0f (patch) | |
tree | f91f004a8f568b32b857f5a0d23a54626901d42b /include/clang/Format/Format.h | |
parent | ca547dbbb1e10c801158f2eecaf3d49e1071b0e3 (diff) |
Add option to avoid "bin-packing" of parameters.
"Bin-packing" here means allowing multiple parameters on one line, if a
function call/declaration is spread over multiple lines.
This is required by the Chromium style guide and probably desired for
the Google style guide. Not making changes to LLVM style as I don't have
enough data.
With this enabled, we format stuff like:
aaaaaaaaaaaaaaa(aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaa();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Format/Format.h')
-rw-r--r-- | include/clang/Format/Format.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h index 19c4c02f82..c32bd5b233 100644 --- a/include/clang/Format/Format.h +++ b/include/clang/Format/Format.h @@ -57,6 +57,10 @@ struct FormatStyle { /// \brief The number of spaces to before trailing line comments. unsigned SpacesBeforeTrailingComments; + /// \brief If false, a function call's or function definition's parameters + /// will either all be on the same line or will have one line each. + bool BinPackParameters; + /// \brief If the constructor initializers don't fit on a line, put each /// initializer on its own line. bool ConstructorInitializerAllOnOneLineOrOnePerLine; |