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)
commita9855afedfe65a797cf98b51171d6bee513e28b9
tree5e998557921db23bc8b9d3ab079180344ab3181c
parent6918dcafe8ea256ae1ff0b51a95d4a5d076cd380
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

llvm-svn: 280487
clang/lib/Format/Format.cpp
clang/lib/Format/SortJavaScriptImports.cpp
clang/lib/Format/TokenAnalyzer.cpp
clang/lib/Format/TokenAnalyzer.h
clang/unittests/Format/FormatTestJS.cpp