dkt01 marked 11 inline comments as done. dkt01 added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:1195-1198 + // Handle unbalanced braces. + if (!Scopes.empty()) + Scopes.pop_back(); // Lines can start with '}'. ---------------- owenpan wrote: > I don't think it's about unbalanced braces here. `if (!Scopes.empty())` handles unbalanced braces. `if(Tok->Previous)` handles the case where a line starts with an rbrace. ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:2481-2482 + if (Tok.is(tok::amp) && (PrevToken && PrevToken->Tok.isAnyIdentifier()) && + (!PrevToken->getPreviousNonComment() || + IsChainedOperatorAmpOrMember(PrevToken->getPreviousNonComment())) && + (NextToken && NextToken->Tok.isAnyIdentifier()) && ---------------- owenpan wrote: > The lambda would check that `PrevToken` is nonnull. `!PrevToken->getPreviousNonComment() ||` is a different check than the null check in the lambda. It's acceptable to have no token two tokens prior because that indicates the ampersand is the second token of the line. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141959/new/ https://reviews.llvm.org/D141959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits