balazske wrote:
I did not get crash with this script and latest clang. Probably there is a
difference in the used system headers (`iostream` and `string` is included)?
https://github.com/llvm/llvm-project/pull/87144
___
cfe-commits mailing list
jcsxky wrote:
> Hi @jcsxky , I fetched and rebased to origin/main just now (6/16/2024 at
> 4:30pm Central US time), and rebuilt - and I see the crash. Did you try
> rebasing to latest source and rebuilding?
>
> `$ clang --analyze -Xclang -analyzer-config -Xclang
>
vabridgers wrote:
Hi @jcsxky , I fetched and rebased to origin/main just now (6/16/2024 at 4:30pm
Central US time), and rebuilt - and I see the crash. Did you try rebasing to
latest source and rebuilding?
`$ clang --analyze -Xclang -analyzer-config -Xclang
jcsxky wrote:
```cpp
ls
bstrwrap.cpp bstrwrap.h ctudir test.cpp test.plist test.sh
cat bstrwrap.cpp
#include "bstrwrap.h"
#include
Bstrlib::CBString::CBString () {
}
cat bstrwrap.h
#include
namespace Bstrlib {
struct CBString {
CBString ();
};
extern std::istream& getline (void);
}
vabridgers wrote:
Hello @jcsxky , here's a simplified reproducer that drives the crash from a
shell script. All you need to do is make sure your clang build is in the path.
I repro'd this on a RHEL7 host, just in case that details matters (but I don't
think it will).
This script echos the
jcsxky wrote:
> This change has caused a regression in one of our systems integration tests
> that test static analysis for the bstring lib project
> (https://github.com/websnarf/bstrlib) with cross translation unit analysis
> enabled. Unfortunately I do not have a simple reproducer that
vabridgers wrote:
@dkrupp , @balazske
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
vabridgers wrote:
This change has caused a regression in one of our systems integration tests
that test static analysis for the bstring lib project
(https://github.com/websnarf/bstrlib) with cross translation unit analysis
enabled. Unfortunately I do not have a simple reproducer that stands
@@ -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
26 matches
Mail list logo