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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182205 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/ClangFormat.rst b/docs/ClangFormat.rst
index a9687bc..8df7d24 100644
--- a/docs/ClangFormat.rst
+++ b/docs/ClangFormat.rst
@@ -20,8 +20,8 @@
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 @@
-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: