klimek added inline comments.
================ Comment at: lib/Format/UsingDeclarationsSorter.cpp:41-42 + +bool computeUsingDeclarationLabel(const FormatToken *UsingTok, + std::string *Label) { + assert(UsingTok && UsingTok->is(tok::kw_using) && "Expecting a using token"); ---------------- Use either: - an empty label to indicate that there is no more label, and thus we couldn't compute one - use an llvm::ErrorOr as return value ================ Comment at: lib/Format/UsingDeclarationsSorter.cpp:59 + Tok = Tok->Next; + if (Tok && Tok->is(tok::coloncolon)) { + Label->append("::"); ---------------- I'd invert this if - the happy case is in the if here. That way, you also don't need a continue. https://reviews.llvm.org/D33823 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits