-
Notifications
You must be signed in to change notification settings - Fork 15k
[Clang] Fix crash on void{}
#147514
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] Fix crash on void{}
#147514
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,19 @@ | ||
| // RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s | ||
| // RUN: %clang_cc1 -std=c++11 -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s | ||
|
|
||
| void f() | ||
| { | ||
| // CHECK: store i32 0 | ||
| int i{}; | ||
| } | ||
|
|
||
|
|
||
| namespace GH116440 { | ||
| void f() { | ||
| void{}; | ||
| void(); | ||
| } | ||
|
||
|
|
||
| // CHECK: define{{.*}} void @_ZN8GH1164401fEv() | ||
|
||
| // CHECK-NEXT: entry | ||
| // CHECK-NEXT: ret void | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new assert formulation raises a warning in gcc -Wall: https://godbolt.org/z/G8v1zqE4Y
And the grouping of the comment "init list ignored" to only the second condition seems unintended or misleading. Could we revise this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #158635