aboutsummaryrefslogtreecommitdiff
path: root/clang/docs/ClangFormat.rst
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-05-19 00:53:30 +0000
committerAlexander Kornienko <alexfh@google.com>2013-05-19 00:53:30 +0000
commit006b5c89cec1ae5de19bcbef71c04c74754594fb (patch)
tree3330dbe770316ce2fe22e9666044acc88ef5707e /clang/docs/ClangFormat.rst
parent8cfbaa6988282d52f17b2ddb2944582804bbc247 (diff)
downloadllvm-006b5c89cec1ae5de19bcbef71c04c74754594fb.zip
llvm-006b5c89cec1ae5de19bcbef71c04c74754594fb.tar.gz
llvm-006b5c89cec1ae5de19bcbef71c04c74754594fb.tar.bz2
Clang-format: allow -style="{yaml/json}" on command line
Summary: + improved handling of default style and predefined styles. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D813 llvm-svn: 182205
Diffstat (limited to 'clang/docs/ClangFormat.rst')
-rw-r--r--clang/docs/ClangFormat.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst
index a9687bc..8df7d24 100644
--- a/clang/docs/ClangFormat.rst
+++ b/clang/docs/ClangFormat.rst
@@ -20,8 +20,8 @@ to format C/C++/Obj-C code.
If no arguments are specified, it formats the code from standard input
and writes the result to the standard output.
- If <file>s are given, it reformats the files. If -i is specified
- together with <file>s, the files are edited in-place. Otherwise, the
+ If <file>s are given, it reformats the files. If -i is specified
+ together with <file>s, the files are edited in-place. Otherwise, the
result is written to the standard output.
USAGE: clang-format [options] [<file> ...]
@@ -47,10 +47,13 @@ to format C/C++/Obj-C code.
-output-replacements-xml - Output replacements as XML.
-style=<string> - Coding style, currently supports:
LLVM, Google, Chromium, Mozilla.
- Use '-style file' to load style configuration from
+ Use -style=file to load style configuration from
.clang-format file located in one of the parent
directories of the source file (or current
directory for stdin).
+ Use -style="{key: value, ...}" to set specific
+ parameters, e.g.:
+ -style="{BasedOnStyle: llvm, IndentWidth: 8}"
General options: