clang-format: [JS] terminate import sorting on `export type X = Y`
authorJan Kuhle <jankuehle@google.com>
Mon, 15 May 2023 13:33:33 +0000 (15:33 +0200)
committerKrasimir Georgiev <krasimir@google.com>
Mon, 15 May 2023 13:37:18 +0000 (15:37 +0200)
commite1f34b735b669c5978bfdead874ee59d33f99eb0
tree2a2f6ccf401acb6f2ca5590ab2cdb0ab1ab258e0
parent1f479c1e46d111a6f001cf4ee24290f60f13257d
clang-format: [JS] terminate import sorting on `export type X = Y`

Contributed by @jankuehle!

https://reviews.llvm.org/D150116 introduced a bug. `export type X = Y` was considered an export declaration and took part in import sorting. This is not correct. With this change `export type X = Y` properly terminates import sorting.

Reviewed By: krasimir

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