clang-format: [JS] don't sort named imports if off.
authorMartin Probst <martin@probst.io>
Fri, 11 Jun 2021 09:43:00 +0000 (11:43 +0200)
committerMartin Probst <martin@probst.io>
Fri, 11 Jun 2021 10:02:33 +0000 (12:02 +0200)
commit63042d46bb0c2481a8b7aa1c324405c2720b3603
tree0d8de5de4a14ab14201668f47aae4937a6f5274e
parent646e970d44d7eaf4f56e2956fb58b48eb9360cb3
clang-format: [JS] don't sort named imports if off.

The previous implementation would accidentally still sort the individual
named imports, even if the module reference was in a clang-format off
block.

Differential Revision: https://reviews.llvm.org/D104101
clang/lib/Format/SortJavaScriptImports.cpp
clang/unittests/Format/SortImportsTestJS.cpp