aaron.ballman added a comment. Just nits from me, but otherwise LGTM!
================ Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:556 +def warn_cxx20_alias_in_init_statement : Warning< + "alias declaration in this context is incompatible with C++ standards before C++23">, + DefaultIgnore, InGroup<CXXPre2bCompat>; ---------------- ================ Comment at: clang/include/clang/Parse/Parser.h:1982 + ParseAliasDeclarationInInitStatement(DeclaratorContext Context, + ParsedAttributesWithRange &attrs); ---------------- ================ Comment at: clang/lib/Parse/ParseExprCXX.cpp:1915 +Parser::ParseAliasDeclarationInInitStatement(DeclaratorContext Context, + ParsedAttributesWithRange &attrs) { + assert(Tok.is(tok::kw_using) && "Expected using"); ---------------- ================ Comment at: clang/test/Parser/cxx2b-init-statement.cpp:19 + + if (using enum ns::e; false){} // expected-error {{expected '='}} + ---------------- erichkeane wrote: > Is there any way to have this elaborate more? The 'expected 'TOKEN'' is my > least favorite type of error. Could we change this to be something like, > 'expected '=' in type alias' or something? FWIW, I'm fine with the diagnostic as-is because I don't expect anyone to actually *use* this functionality, so I don't expect a ton of users to hit this. I'd say it's fine to address when a user files a bug showing some code where the diagnostic is unclear. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111175/new/ https://reviews.llvm.org/D111175 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits