================ @@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if (InExpr && !SeenFatArrow && !Line.startsWith(tok::kw_template) && Prev.is(TT_BinaryOperator)) { const auto Precedence = Prev.getPrecedence(); if (Precedence > prec::Conditional && Precedence < prec::Relational) return false; } if (Prev.isOneOf(tok::question, tok::colon) && !Style.isProto()) SeenTernaryOperator = true; + else if (Prev.is(TT_FatArrow)) ---------------- rymiel wrote:
> If they were to just change handling of ternary expressions, but they changed > behavior for expressions that don't have ? in them, it sounds like an > unintended change. All these template edge-cases weren't being represented in testing. My change broke no tests, but it caused a lot of fallout in the issues. I regret making that change, but by now it's too late. I'm sorry https://github.com/llvm/llvm-project/pull/108671 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits