clang-format: [JS] no ASI on import {x as\n y}.

Summary: ASI did not handle the ES6 `as` operator correctly.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D20817

llvm-svn: 271401
This commit is contained in:
Martin Probst
2016-06-01 15:22:47 +00:00
parent 081f176a62
commit 48622090c7
3 changed files with 9 additions and 6 deletions

View File

@@ -245,7 +245,7 @@ private:
SourceLocation SymbolsEnd = Reference.Symbols.back().Range.getEnd();
Buffer += getSourceText(Reference.Range.getBegin(), SymbolsStart);
// ... then the references in order ...
for (auto *I = Symbols.begin(), *E = Symbols.end(); I != E; ++I) {
for (auto I = Symbols.begin(), E = Symbols.end(); I != E; ++I) {
if (I != Symbols.begin())
Buffer += ",";
Buffer += getSourceText(I->Range);