[PATCH] D36132: clang-format: [JS] support default imports.

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 04:37:54 PDT 2017


djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Format/SortJavaScriptImports.cpp:416
         break;
-      if (Current->isNot(tok::identifier))
+      if (Current->isNot(tok::identifier) && Current->isNot(tok::kw_default))
         return false;
----------------
Change to

  !Current->isOneOf(tok::identifier, tok::kw_default)

Same below.


https://reviews.llvm.org/D36132





More information about the cfe-commits mailing list