diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-13 20:33:44 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-13 20:33:44 +0000 |
commit | a03ab10f0e4d888139b3b694dd55d176982f72a4 (patch) | |
tree | b6430a75f6b55f092469562b1e84c44698c8e057 /include/clang/Format | |
parent | 778749aa7c2ed73ffeb60065dc015ed62127c8e1 (diff) |
Allow breaking after the return type in function declarations.
This has so far been disabled for Google style, but should be done
before breaking at nested name specifiers or in template parameters.
Before (in Google style):
template <typename T>
aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaa<
T>::aaaaaaa() {}
After:
template <typename T>
aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa>
aaaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaa() {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Format')
-rw-r--r-- | include/clang/Format/Format.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h index 75b809baab..d6cc114e3c 100644 --- a/include/clang/Format/Format.h +++ b/include/clang/Format/Format.h @@ -77,8 +77,9 @@ struct FormatStyle { /// the next line even if \c BinPackParameters is \c false. bool AllowAllParametersOfDeclarationOnNextLine; - /// \brief Allow putting the return type of a function onto its own line. - bool AllowReturnTypeOnItsOwnLine; + /// \brief Penalty for putting the return type of a function onto its own + /// line. + unsigned PenaltyReturnTypeOnItsOwnLine; /// \brief If the constructor initializers don't fit on a line, put each /// initializer on its own line. |