Debian Codegraph @

clang/test/CXX/dcl.decl/dcl.init/dcl.init.general/p16-cxx20.cpp

raw
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 {
8 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 }