HazardyKnusperkeks added a comment. In D127873#3589465 <https://reviews.llvm.org/D127873#3589465>, @jackhong12 wrote:
> I think it's a good idea. When does `MatchingParen` bind? The value of > `PrevToken->MatchingParen` is still NULL in `determineStarAmpUsage` function. What has changed, now you are using that. ================ Comment at: clang/lib/Format/TokenAnnotator.cpp:2314-2315 + if (PrevToken->is(tok::r_brace) && Tok.isOneOf(tok::amp, tok::ampamp) && + PrevToken->MatchingParen && PrevToken->MatchingParen->is(TT_Unknown)) + return TT_BinaryOperator; + ---------------- Unknown is everything, until some type is assigned. This way it should be clearer. Also put that check above the other one and add the `r_brace` back. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits