diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-09-04 15:09:13 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-09-04 15:09:13 +0000 |
commit | d278e0eee3f8c8f25131983979062b3d8e94ae77 (patch) | |
tree | de34312ab2d5102b79f33136db964f6649b387ee /clang/docs/ClangFormat.rst | |
parent | fd9a9415f5c1b18887d5224fc13b0343a1b84b07 (diff) | |
download | bcm5719-llvm-d278e0eee3f8c8f25131983979062b3d8e94ae77.tar.gz bcm5719-llvm-d278e0eee3f8c8f25131983979062b3d8e94ae77.zip |
Added documentation for clang-format style options.
Summary:
The main contents is in the ClangFormatStyleOptions.rst, which can be
updated from the Format.h by the dump_format_style.py script.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1597
llvm-svn: 189946
Diffstat (limited to 'clang/docs/ClangFormat.rst')
-rw-r--r-- | clang/docs/ClangFormat.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst index b932007dd70..b9fa76aaafa 100644 --- a/clang/docs/ClangFormat.rst +++ b/clang/docs/ClangFormat.rst @@ -70,6 +70,20 @@ to format C/C++/Obj-C code. -version - Display the version of this program +When the desired code formatting style is different from the available options, +the style can be customized using the ``-style="{key: value, ...}"`` option or +by putting your style configuration to the ``.clang-format`` file in your +project's directory and using ``clang-format -style=file``. + +An easy way to create the ``.clang-format`` file is: + +.. code-block:: console + + clang-format -style=llvm -dump-config > .clang-format + +Available style options are described in :doc:`ClangFormatStyleOptions`. + + Vim Integration =============== |