================ @@ -3167,6 +3167,15 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, DeclaratorInfo.complete(ThisDecl); + if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) { + if (Tok.is(tok::comma)) { + Diag(Tok, diag::err_multiple_template_declarators) + << (int)TemplateInfo.Kind; + SkipUntil(tok::semi, StopBeforeMatch); + } + break; + } ---------------- erichkeane wrote:
The 'later' we do these sort of diagnostics, the better we are at recovering from them, and the better the diagnostics can be. IMO, if this is possible, putting this in FinalizeDeclaratorGroup makes a lot more sense here. At least that way, we could recover and pretend one of those are the 'right' template that we intend to declare. https://github.com/llvm/llvm-project/pull/78243 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits