================ @@ -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; + } ---------------- sdkrystian wrote:
How about issuing the diagnostics in the parser, but instead of skipping to the semicolon we just continue parsing? That way the diagnostics are issued in lexical order when a declaration with multiple errors is encountered. 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