diff options
author | Martin Probst <martin@probst.io> | 2017-01-27 09:09:11 +0000 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2017-01-27 09:09:11 +0000 |
commit | 75fb37755345b98005fa6bbb371df583dc9dd5ef (patch) | |
tree | dd3f4b0561c5ef61574380ad48df5b4973cc1fca /tools/clang-format | |
parent | 9e0150bf562dfaaf59b71636a59c084c030183de (diff) |
clang-format: [JS] do not format MPEG transport streams.
Summary:
The MPEG transport stream file format also uses ".ts" as its file extension.
This change detects its specific framing format (0x47 every 189 bytes) and
simply ignores MPEG TS files.
Reviewers: djasper, sammccall
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D29186
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format')
-rw-r--r-- | tools/clang-format/ClangFormat.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/clang-format/ClangFormat.cpp b/tools/clang-format/ClangFormat.cpp index b08d4fa4c1..941f90396d 100644 --- a/tools/clang-format/ClangFormat.cpp +++ b/tools/clang-format/ClangFormat.cpp @@ -256,6 +256,7 @@ static bool format(StringRef FileName) { llvm::errs() << llvm::toString(FormatStyle.takeError()) << "\n"; return true; } + if (SortIncludes.getNumOccurrences() != 0) FormatStyle->SortIncludes = SortIncludes; unsigned CursorPosition = Cursor; |