]> granicus.if.org Git - clang/commit
clang-format: [JS] merge requoting replacements.
authorMartin Probst <martin@probst.io>
Fri, 2 Sep 2016 14:29:48 +0000 (14:29 +0000)
committerMartin Probst <martin@probst.io>
Fri, 2 Sep 2016 14:29:48 +0000 (14:29 +0000)
commit9348abc0492d694ebc44e08502e7adaaf44f6e78
tree86d2350bcca0f6c62008fa5d1cdb2346d824c569
parent546274f58d993b8ccb3fb438f446f1bd003abaa9
clang-format: [JS] merge requoting replacements.

Summary:
When formatting source code that needs both requoting and reindentation,
merge the replacements to avoid erroring out for conflicting replacements.

Also removes the misleading Replacements parameter from the
TokenAnalyzer API.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D24155

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280487 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
lib/Format/SortJavaScriptImports.cpp
lib/Format/TokenAnalyzer.cpp
lib/Format/TokenAnalyzer.h
unittests/Format/FormatTestJS.cpp