bolt/deps/llvm-18.1.8/clang/test/CXX/dcl.decl/dcl.init/dcl.init.general/p16-cxx20.cpp

19 lines
299 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
// If the initializer is (), the object is value-initialized.
// expected-no-diagnostics
namespace GH69890 {
struct A {
constexpr A() {}
int x;
};
struct B : A {
int y;
};
static_assert(B().x == 0);
static_assert(B().y == 0);
}