clang-format: [JS] Fix line breaks before comments when sorting imports.
authorMartin Probst <martin@probst.io>
Mon, 19 Sep 2016 07:02:34 +0000 (07:02 +0000)
committerMartin Probst <martin@probst.io>
Mon, 19 Sep 2016 07:02:34 +0000 (07:02 +0000)
commit63014581aad3a4ac37d2f53674a46dcae5b34f09
tree3e7166b4207b6850bd8e57d108203bc90a48f657
parentcd2bfb1e7ca4148ab1e7526aa96ab96773f695ea
clang-format: [JS] Fix line breaks before comments when sorting imports.

Summary:
Previously, clang-format would always insert an additional line break after the
import block if the main body started with a comment, due to loosing track of
the first non-import line.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 281888
clang/lib/Format/SortJavaScriptImports.cpp
clang/unittests/Format/SortImportsTestJS.cpp