krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land.
Looks good! Please reformat the newly added code blocks with `clang-format` before submitting. ================ Comment at: lib/Format/TokenAnnotator.cpp:1402 + FormatToken *TokenBeforeMatchingParen = + PrevToken->MatchingParen->getPreviousNonComment(); + if (TokenBeforeMatchingParen && ---------------- Please reformat this block with `clang-format`: `PrevToken` gets indented by two more columns to the right. ================ Comment at: lib/Format/TokenAnnotator.cpp:2212 + if (Left.is(tok::r_paren) && Line.MightBeFunctionDecl) { + if (!Left.MatchingParen) + return true; ---------------- Pleasereformat this block with `clang-format`: when I run it, it produces: ``` if (Right.is(TT_PointerOrReference)) { if (Left.is(tok::r_paren) && Line.MightBeFunctionDecl) { if (!Left.MatchingParen) return true; FormatToken *TokenBeforeMatchingParen = Left.MatchingParen->getPreviousNonComment(); if (!TokenBeforeMatchingParen || !TokenBeforeMatchingParen->isOneOf(tok::kw_typeof, tok::kw_decltype)) return true; } return (Left.Tok.isLiteral() || (Left.is(tok::kw_const) && Left.Previous && Left.Previous->is(tok::r_paren)) || (!Left.isOneOf(TT_PointerOrReference, tok::l_paren) && (Style.PointerAlignment != FormatStyle::PAS_Left || (Line.IsMultiVariableDeclStmt && (Left.NestingLevel == 0 || (Left.NestingLevel == 1 && Line.First->is(tok::kw_for))))))); } ``` https://reviews.llvm.org/D35847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits