diff options
author | Daniel Jasper <djasper@google.com> | 2015-09-23 08:30:47 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-09-23 08:30:47 +0000 |
commit | d89ae9d3accb4cb8b7357932c3dfba8f4ae383c4 (patch) | |
tree | ed7b06902aba907fb09f8524a1b1edbe897e69b2 /clang/tools/clang-format/clang-format.py | |
parent | 9fcf72ef9bdc047a7ab24d0fc00604cddbd5ddf5 (diff) | |
download | bcm5719-llvm-d89ae9d3accb4cb8b7357932c3dfba8f4ae383c4.tar.gz bcm5719-llvm-d89ae9d3accb4cb8b7357932c3dfba8f4ae383c4.zip |
clang-format: Add initial #include sorting capabilities.
To implement this nicely, add a function that merges two sets of
replacements that are meant to be done in sequence. This functionality
will also be useful for other applications, e.g. formatting the result
of clang-tidy fixes.
llvm-svn: 248367
Diffstat (limited to 'clang/tools/clang-format/clang-format.py')
-rw-r--r-- | clang/tools/clang-format/clang-format.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py index 5cb41fcfa37..1725e8659ad 100644 --- a/clang/tools/clang-format/clang-format.py +++ b/clang/tools/clang-format/clang-format.py @@ -72,7 +72,7 @@ def main(): startupinfo.wShowWindow = subprocess.SW_HIDE # Call formatter. - command = [binary, '-style', style, '-cursor', str(cursor)] + command = [binary, '-style', style, '-cursor', str(cursor), '-sort-includes'] if lines != 'all': command.extend(['-lines', lines]) if fallback_style: |