1 // RUN: %clang_cc1 -std=c++1z -verify %s
7 template <typename Ctx
> class record
{
15 namespace pr33140_0a
{
17 constexpr S(const int &a
= 0) {}
19 void foo(void) { S s
[2] = {}; }
22 namespace pr33140_0b
{
23 bool bar(float const &f
= 0);
24 bool foo() { return bar() && bar(); }
28 // FIXME: The declaration of 'b' below should lifetime-extend two int
30 struct A
{ int &&r
= 0; }; // expected-note 2{{initializing field 'r' with default member initializer}}
32 B b
= {}; // expected-warning 2{{not supported}}
36 typedef struct Y
{ unsigned int c
; } Y_t
;
40 struct X foo
[2] = {[0 ... 1] = {.a
= (Y_t
){.c
= 0}}}; // expected-warning {{C99 extension}}
44 struct Y
{ unsigned int c
; };
45 struct X
{ struct Y
*p
; };
47 // FIXME: This causes clang to crash.
48 //return (struct X[2]){ [0 ... 1] = { .p = &(struct Y&)(struct Y&&)(struct Y){0} } }[0].p->c;
53 namespace pr33140_10
{
54 int a(const int &n
= 0);
55 bool b() { return a() == a(); }