================ @@ -1639,6 +1639,25 @@ class AnnotatingParser { case tok::kw_operator: if (Style.isProto()) break; + // C++ user-defined conversion function. + if (IsCpp && CurrentToken && + (CurrentToken->is(tok::kw_auto) || + CurrentToken->isTypeName(LangOpts))) { + FormatToken *LParen; + if (CurrentToken->startsSequence(tok::kw_decltype, tok::l_paren, + tok::kw_auto, tok::r_paren)) { + LParen = CurrentToken->Next->Next->Next->Next; + } else { + for (LParen = CurrentToken->Next; + LParen && LParen->isNot(tok::l_paren); LParen = LParen->Next) { + } + } + if (LParen && LParen->startsSequence(tok::l_paren, tok::r_paren)) { ---------------- HazardyKnusperkeks wrote:
This does not match on `operator Foo(void)`. https://github.com/llvm/llvm-project/pull/131434 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits