jgorbe added a comment.
Hi, one of our tests is failing because of this patch and it looks like an
actual bug. clang-format now turns this file:
import './a';
import {bar} from './a';
into this:
barimport './a';
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https:/
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
mprobst marked an inline comment as done.
Closed by commit rGd45df0d29f70: clang-format: [JS] merge import lines.
(authored by mprobst).
Changed prior to commit:
htt
h-joo accepted this revision.
h-joo added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100466/new/
https://reviews.llvm.org/D100466
___
c
mprobst marked 3 inline comments as done.
mprobst added inline comments.
Comment at: clang/lib/Format/SortJavaScriptImports.cpp:92
+ // reference needs re-formatting.
+ bool SymbolsMerged;
// The source location just after { and just before } in the import.
mprobst updated this revision to Diff 337456.
mprobst added a comment.
address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100466/new/
https://reviews.llvm.org/D100466
Files:
clang/lib/Format/SortJavaScriptImports.cpp
clang/
h-joo added inline comments.
Comment at: clang/lib/Format/SortJavaScriptImports.cpp:154
+// Merge module references:
+// After sorting, find all references that import named symbols from the
Would it be better if this were a named function?
==
mprobst created this revision.
mprobst added a reviewer: krasimir.
mprobst requested review of this revision.
Herald added a project: clang.
Multiple lines importing from the same URL can be merged:
import {X} from 'a';
import {Y} from 'a';
Merge to:
import {X, Y} from 'a';
This change i