29 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -verify %s2// Check we don't crash on incomplete members and bases when handling parenthesized initialization.3class incomplete; // expected-note@-0 3 {{forward declaration of 'incomplete'}}4struct foo {5 int a;6 incomplete b;7 // expected-error@-1 {{incomplete type}}8};9foo a1(0);10 11struct one_int {12 int a;13};14struct bar : one_int, incomplete {};15// expected-error@-1 {{incomplete type}}16bar a2(0);17 18incomplete a3[3](1,2,3);19// expected-error@-1 {{incomplete type}}20 21struct qux : foo {22};23qux a4(0);24 25struct fred {26 foo a[3];27};28fred a5(0);29