djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land.
Some minor remarks, but generally looks good. Thanks for fixing this! ================ Comment at: lib/Format/UsingDeclarationsSorter.cpp:136 for (size_t I = 0, E = AnnotatedLines.size(); I != E; ++I) { + auto FirstTok = AnnotatedLines[I]->First; if (AnnotatedLines[I]->InPPDirective || ---------------- const auto *FirstTok or const FormatToken *FirstTok ================ Comment at: lib/Format/UsingDeclarationsSorter.cpp:142 } - if (AnnotatedLines[I]->First->NewlinesBefore > 1) + if (FirstTok->NewlinesBefore > 1) { endUsingDeclarationBlock(&UsingDeclarations, SourceMgr, &Fixes); ---------------- We don't use braces around single-statement ifs in LLVM style. ================ Comment at: lib/Format/UsingDeclarationsSorter.cpp:145 + } + auto UsingTok = + FirstTok->is(tok::comment) ? FirstTok->getNextNonComment() : FirstTok; ---------------- const auto *UsingTok or const FormatToken *UsingTok https://reviews.llvm.org/D39478 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits