[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in ff013b61004b01043bdbebb6416c30ecb3d3d48c , thank you for the new functionality! Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Parser/cxx2b-init-statement.cpp:19 + +if (using enum ns::e; false){} // expected-error {{expected '='}} + cor3ntin wrote: > erichkeane wrote: > > aaron.ballman wrote: > > > erichkeane wrote: > > > > Is

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Parser/cxx2b-init-statement.cpp:19 + +if (using enum ns::e; false){} // expected-error {{expected '='}} + erichkeane wrote: > aaron.ballman wrote: > > erichkeane wrote: > > > Is there any way to have thi

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Parser/cxx2b-init-statement.cpp:19 + +if (using enum ns::e; false){} // expected-error {{expected '='}} + aaron.ballman wrote: > erichkeane wrote: > > Is there any way to have this elaborate more? The

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 377930. cor3ntin added a comment. Fix version in diagnostics in the right direction (23 => 2b) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75/new/ https://reviews.llvm.org/D75 Files: clang/docs/Re

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 377929. cor3ntin added a comment. fix diagnostic, nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75/new/ https://reviews.llvm.org/D75 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Bas

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
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">,

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Parser/cxx2b-init-statement.cpp:19 + +if (using enum ns::e; false){} // expected-error {{expected '='}} + Is there any way to have this elaborate more? The 'expected 'TOKEN'' is my least favorite typ

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 377921. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. Add C++20 compat warning, fix style. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75/new/ https://reviews.llvm.org/D75 Fil

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:552-553 "extraneous ')' after condition, expected a statement">; +def ext_alias_in_init_statement : ExtWarn< + "alias declaration in this context is a C++2b extension">, + InGr

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 377756. cor3ntin added a comment. Update release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75/new/ https://reviews.llvm.org/D75 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Bas

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 377755. cor3ntin marked an inline comment as done. cor3ntin added a comment. - Modify ParseUsingDeclaration to only parse an alias in init statememts - Make the c++23 extebsion warning clearer - Nitpicks. The error is now 'expected '=', which seems good enou

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin planned changes to this revision. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:553 +def err_expected_alias_after_using_in_init_statement : Error< + "expected alias declaration after using in init statement">; +def ext_ali

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I agree with aaron, the ParseUsingDeclaration bit should be aware of the DeclaratorContext and emit the error there, rather than try to parse it as whatever and THEN error. The problem is the user-interface at that point, which is to spend a few cycles correcting on

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:553 +def err_expected_alias_after_using_in_init_statement : Error< + "expected alias declaration after using in init statement">; +def ext_alias_in_init_statement : ExtWarn< -

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: erichkeane, rsmith. aaron.ballman added a comment. Thank you for this new feature work! Adding a few more reviewers to the mix. Can you also add a release note for the new functionality? Comment at: clang/include/clang/Basic/DiagnosticParseKinds.

[PATCH] D111175: [Clang] Extend init-statement to allow alias-declaration

2021-10-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a subscriber: jeroen.dobbelaere. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Implement P2360R0 in C++23 mode and as an extension in older languages mode. Repository: rG LLVM Gith