llvm-project/clang/test/CodeGenCXX/cxx0x-initializer-scalars.cpp
Corentin Jabot 5adb9a2936
[Clang] Fix crash on void{} (#147514)
Caused by an incorrect assertion.

Fixes #116440
2025-07-08 17:40:43 +02:00

20 lines
286 B
C++

// 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
}