mprobst marked an inline comment as done. ================ Comment at: lib/Format/SortJavaScriptImports.cpp:77 @@ +76,3 @@ + return false; + // NB: empty URLs sort *last* (for export {...};). + if (LHS.URL.empty() != RHS.URL.empty()) ---------------- djasper wrote: > NB? "Nota bene". Seems to be uncommon in this code base, so removed.
================ Comment at: lib/Format/SortJavaScriptImports.cpp:255 @@ +254,3 @@ + // * as prefix from '...'; + if (Current->is(tok::star)) { + if (!nextToken()) ---------------- djasper wrote: > We probably should really have a variant of AnnotatedLine::startsWith() that > can start at an arbitrary token. But we can try that in a follow-up. Maybe that should be a function on FormatToken itself, that searches the linked list rooted at it? `Current->startsSequence(tok::star, Keywords.kw_as, tok::identifier)`? I'll take a stab at that. http://reviews.llvm.org/D20198 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits