@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
jcsxky wrote:
Ah, I see. I skip those checking
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
zygoloid wrote:
The reserved identifier check
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
zygoloid wrote:
For what name? The `using enum`
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
jcsxky wrote:
These checks include name conflict
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
zygoloid wrote:
Are those useful checks? It seems
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
jcsxky wrote:
`Sema::ActOnUsingEnumDeclaration`
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S,
bool AddToContext) {
cast(D)->isFunctionTemplateSpecialization())
return;
+ if (isa(D) && D->getDeclName().isEmpty()) {
zygoloid wrote:
Why do we push a `UsingEnumDecl`
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/87144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/87144
>From c4adc0ae83294e4524f2740a40eee483c2cb Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 30 Mar 2024 14:47:00 +0800
Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum
declaration
https://github.com/shafik commented:
LGTM after addressing Aaron's comments.
Can you elaborate more on the details of the bug in the summary. This goes into
the git log and we want folks to be able to understand the problem well from
the summary w/o having to do additional checks.
Thank you
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
+// expected-no-diagnostics
+
+enum {A, S, D, F};
+int main() {
+using asdf = decltype(A);
+using enum asdf; // this line causes the crash
+return 0;
+}
AaronBallman wrote:
I'd
https://github.com/AaronBallman approved this pull request.
Thank you! LGTM aside from expanding the testing a bit.
https://github.com/llvm/llvm-project/pull/87144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/87144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/87144
>From 8a0d7c30b2e0efae395143bcd599f3de8d018394 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 30 Mar 2024 14:47:00 +0800
Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum
declaration
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/87144
>From 92da0db6815e07419256ea7fd531d0785a47d8fc Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 30 Mar 2024 14:47:00 +0800
Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum
declaration
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/87144
>From 6a0557097548d1a83592185a72c6609ee9ae0a17 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 30 Mar 2024 14:47:00 +0800
Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum
declaration
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Qizhi Hu (jcsxky)
Changes
Try to fix https://github.com/llvm/llvm-project/issues/86790
Skip checking anonymous enumeration in using enum declaration.
---
Full diff: https://github.com/llvm/llvm-project/pull/87144.diff
3 Files Affected:
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/87144
Try to fix https://github.com/llvm/llvm-project/issues/86790
Skip checking anonymous enumeration in using enum declaration.
>From bff555ed0466a74a4e23d7d4feca2940ee04b719 Mon Sep 17 00:00:00 2001
From: huqizhi
18 matches
Mail list logo