[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-22 Thread via cfe-commits
github-actions[bot] wrote: @katzdm Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-22 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
katzdm wrote: > You can ignore the merge conflicts in the release notes; it’s better to let > whoever ends up merging this (probably me) take care of that when it comes to > the release notes (because they get updated constantly). Ah, missed this - already fixed it. Will ignore if it happens

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > > You can ignore the merge conflicts in the release notes; it’s better to let > > whoever ends up merging this (probably me) take care of that when it comes > > to the release notes (because they get updated constantly). > > Ah, missed this - already fixed it. Will ignore if

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig): [path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"] ) try: +localConfig.environment['DYLD_LIBRARY_PATH'] = '' katzdm wrote: Done, thanks

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 1998809477ce9ef03516278e1f0e9084426ea7f2 Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/4] Raise an error on namespace aliases with qualified names. Current

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -394,6 +394,8 @@ Bug Fixes to C++ Support expression references to an entity declared outside of the lambda. (#GH64808) - Clang's __builtin_bit_cast will now produce a constant value for records with empty bases. See: (#GH82383) +- Fix an issue where a namespace alias

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -394,6 +394,8 @@ Bug Fixes to C++ Support expression references to an entity declared outside of the lambda. (#GH64808) - Clang's __builtin_bit_cast will now produce a constant value for records with empty bases. See: (#GH82383) +- Fix an issue where a namespace alias

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. LGTM except for a minor comment wrt the release note. https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
Sirraide wrote: > ``` > test.cpp:4:20: error: namespace alias must be a single identifier > 4 | namespace alias::extra::qualifiers = ::myns; > |^~~ > 1 error generated. > ``` Nice, that is pretty much exactly what I had in mind.

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/3] Raise an error on namespace aliases with qualified names. Current

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/86122 >From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Thu, 21 Mar 2024 09:47:04 -0400 Subject: [PATCH 1/2] Raise an error on namespace aliases with qualified names. Current

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
katzdm wrote: @Sirraide Thanks for the quick review! I've applied your feedback. Here is an example error message with the patch applied: ``` test.cpp:4:20: error: namespace alias must be a single identifier 4 | namespace alias::extra::qualifiers = ::myns; |

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel M. Katz (katzdm) Changes Clang's current behavior is to ignore the trailing qualifiers, but the [grammar](https://eel.is/c++draft/namespace.alias#nt:namespace-alias-definition) for `namespace-alias-definition` requires an

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -140,6 +140,11 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SkipUntil(tok::semi); return nullptr; } +if (!ExtraNSs.empty()) { + Diag(IdentLoc, diag::err_unexpected_qualified_namespace_alias); Sirraide

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -268,6 +268,8 @@ def err_expected_semi_after_namespace_name : Error< "expected ';' after namespace name">; def err_unexpected_namespace_attributes_alias : Error< "attributes cannot be specified on namespace alias">; +def err_unexpected_qualified_namespace_alias : Error<

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -140,6 +140,11 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SkipUntil(tok::semi); return nullptr; } +if (!ExtraNSs.empty()) { + Diag(IdentLoc, diag::err_unexpected_qualified_namespace_alias); Sirraide

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. Thanks for contributing! This needs a release note (in `clang/docs/ReleaseNotes.rst`) and some changes to the diagnostics, but other than that it looks fine to me. https://github.com/llvm/llvm-project/pull/86122

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -268,6 +268,8 @@ def err_expected_semi_after_namespace_name : Error< "expected ';' after namespace name">; def err_unexpected_namespace_attributes_alias : Error< "attributes cannot be specified on namespace alias">; +def err_unexpected_qualified_namespace_alias : Error<

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm created https://github.com/llvm/llvm-project/pull/86122 Clang's current behavior is to ignore the trailing qualifiers, but the [grammar](https://eel.is/c++draft/namespace.alias#nt:namespace-alias-definition) for `namespace-alias-definition` requires an `identifier`

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,