Add an usage example of BreakBeforeBraces

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 312717
This commit is contained in:
Sylvestre Ledru 2017-09-07 12:09:14 +00:00
parent 44d1ef140b
commit 7372d48c74
2 changed files with 17 additions and 0 deletions

View File

@ -533,6 +533,15 @@ the configuration (without a prefix: ``Auto``).
If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
each individual brace case should be handled. Otherwise, this is ignored.
.. code-block:: yaml
# Example of usage:
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: true
AfterStruct: false
SplitEmptyFunction: false
Nested configuration flags:

View File

@ -746,6 +746,14 @@ struct FormatStyle {
///
/// If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
/// each individual brace case should be handled. Otherwise, this is ignored.
/// \code{.yaml}
/// # Example of usage:
/// BreakBeforeBraces: Custom
/// BraceWrapping:
/// AfterEnum: true
/// AfterStruct: false
/// SplitEmptyFunction: false
/// \endcode
BraceWrappingFlags BraceWrapping;
/// \brief If ``true``, ternary operators will be placed after line breaks.