xref: /llvm-project/clang/test/CXX/dcl.decl/dcl.init/dcl.init.general/p16-cxx20.cpp (revision b8e06933a2f4a647046f122a8e4a636c0e9267b7)
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
2 
3 // If the initializer is (), the object is value-initialized.
4 
5 // expected-no-diagnostics
6 namespace GH69890 {
7 struct A {
AGH69890::A8     constexpr A() {}
9     int x;
10 };
11 
12 struct B : A {
13     int y;
14 };
15 
16 static_assert(B().x == 0);
17 static_assert(B().y == 0);
18 }
19