Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clang] Accepts invalid alias template with the same name as its template parameter #123423

Closed
MagentaTreehouse opened this issue Jan 17, 2025 · 5 comments · Fixed by #123533
Closed
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party diverges-from:edg Does the clang frontend diverge from edg compiler diverges-from:gcc Does the clang frontend diverge from gcc on this issue diverges-from:msvc Does the clang frontend diverge from msvc on this issue

Comments

@MagentaTreehouse
Copy link
Contributor

template <class T>
using T = int;

This is rejected by GCC, MSVC and EDG.

See https://compiler-explorer.com/z/6a5jWGn4s.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 17, 2025
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" diverges-from:gcc Does the clang frontend diverge from gcc on this issue diverges-from:msvc Does the clang frontend diverge from msvc on this issue diverges-from:edg Does the clang frontend diverge from edg compiler and removed clang Clang issues not falling into any other category labels Jan 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 17, 2025

@llvm/issue-subscribers-clang-frontend

Author: None (MagentaTreehouse)

```c++ template <class T> using T = int; ```

This is rejected by GCC, MSVC and EDG.

See https://compiler-explorer.com/z/6a5jWGn4s.

@zygoloid zygoloid added the confirmed Verified by a second party label Jan 18, 2025
@zygoloid
Copy link
Collaborator

Confirmed, violates this rule.

@BaLiKfromUA
Copy link
Contributor

BaLiKfromUA commented Jan 18, 2025

Hi folks!

I am interested in solving this issue, but I haven't contributed anything to the upstream Clang project yet and I see that this issue is not marked as a "good first issue".

However, I do have some basic experience with building, testing, and changing some experimental fork of Clang.

Is it fine for me to pick up this task or do you have other processes and expectations in Clang project?

P.S. Sorry for noob question :)

@cor3ntin
Copy link
Contributor

cor3ntin commented Jan 18, 2025

Is it fine for me to pick up this task?

Of course!
Here is some documentation https://llvm.org/docs/Contributing.html

In addition of the code change you should provide

  • A sufficiently detailed description/commit message
  • Tests (in clang/tests)
  • A release note in clang/docs/ReleaseNotes.rst under "bug fixes to c++ support"

I hope this help

@BaLiKfromUA
Copy link
Contributor

Thank you!

I will look on this issue

BaLiKfromUA added a commit to BaLiKfromUA-education/llvm-project that referenced this issue Jan 19, 2025
BaLiKfromUA added a commit to BaLiKfromUA-education/llvm-project that referenced this issue Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party diverges-from:edg Does the clang frontend diverge from edg compiler diverges-from:gcc Does the clang frontend diverge from gcc on this issue diverges-from:msvc Does the clang frontend diverge from msvc on this issue
Projects
None yet
6 participants