clang-format: Add include sorting capabilities to sublime, emacs and

clang-format-diff.py.

llvm-svn: 249567
This commit is contained in:
Daniel Jasper
2015-10-07 17:00:20 +00:00
parent 0db335fd5e
commit db125cb326
3 changed files with 6 additions and 1 deletions

View File

@@ -52,6 +52,8 @@ def main():
r'|protodevel|java)',
help='custom pattern selecting file paths to reformat '
'(case insensitive, overridden by -regex)')
parser.add_argument('-sort-includes', action='store_true', default=False,
help='let clang-format sort include blocks')
parser.add_argument('-v', '--verbose', action='store_true',
help='be more verbose, ineffective without -i')
parser.add_argument(
@@ -96,6 +98,8 @@ def main():
command = [binary, filename]
if args.i:
command.append('-i')
if args.sort_includes:
command.append('-sort-includes')
command.extend(lines)
if args.style:
command.extend(['-style', args.style])