This revision was automatically updated to reflect the committed changes.
Closed by commit rL271400: clang-format: [JS] Sort imported symbols. (authored
by mprobst).
Changed prior to commit:
http://reviews.llvm.org/D20798?vs=59070&id=59226#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20
mprobst marked an inline comment as done.
mprobst added a comment.
http://reviews.llvm.org/D20798
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper accepted this revision.
This revision is now accepted and ready to land.
Comment at: lib/Format/SortJavaScriptImports.cpp:248
@@ +247,3 @@
+// ... then the references in order ...
+for (JsImportedSymbol *I = Symbols.begin(), *E = Symbols.end(); I != E;) {
+ Bu
mprobst added a comment.
Done regarding the tests. We do have an unrelated issue with formatting `import
{x as foo}`, will send a fix later.
http://reviews.llvm.org/D20798
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.or
mprobst updated this revision to Diff 59070.
mprobst added a comment.
- multiline tests, review comments
http://reviews.llvm.org/D20798
Files:
lib/Format/Format.cpp
lib/Format/SortJavaScriptImports.cpp
unittests/Format/SortImportsTestJS.cpp
Index: unittests/Format/SortImportsTestJS.cpp
=
mprobst marked 4 inline comments as done.
mprobst added a comment.
Done regarding the tests. We do have an unrelated issue with formatting `import
{x as foo}`, will send a fix later.
http://reviews.llvm.org/D20798
___
cfe-commits mailing list
cfe-c
djasper added a comment.
In general, this is lacking test cases for imports that are wrapped over
multiple lines to start with. Should probably add those both for the old and
for the new behavior.
Comment at: lib/Format/Format.cpp:1229
@@ -1227,9 +1228,3 @@
// the entire bl
mprobst updated this revision to Diff 59001.
mprobst added a comment.
- extract method for readability
http://reviews.llvm.org/D20798
Files:
lib/Format/Format.cpp
lib/Format/SortJavaScriptImports.cpp
unittests/Format/SortImportsTestJS.cpp
Index: unittests/Format/SortImportsTestJS.cpp
===
mprobst created this revision.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
E.g. sort `import {b, a} from 'x';` into `import {a, b} from 'x';`.
http://reviews.llvm.org/D20798
Files:
lib/Format/Format.cpp
lib/Format/SortJavaScr