[PATCH] D20198: clang-format: [JS] sort ES6 imports.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Thu May 12 03:29:13 PDT 2016


djasper added a comment.

Just two high-level comments. Will review in more depth later.


================
Comment at: include/clang/Format/Format.h:770
@@ +769,3 @@
+/// ``export`` blocks are affected by ``Ranges``.
+tooling::Replacements sortJavaScriptIncludes(const FormatStyle &Style,
+                                             StringRef Code,
----------------
Why is this a separate function as opposed to looking at Style.Language?

================
Comment at: lib/Format/Format.cpp:1958
@@ +1957,3 @@
+// An imported symbol in a JavaScript ES6 import/export, possibly aliased.
+struct JsImportedSymbol {
+  StringRef Symbol;
----------------
I know this file is already a huge mess, but can you move all of the JS import sorting stuff to a separate file?


http://reviews.llvm.org/D20198





More information about the cfe-commits mailing list