1 // RUN: %clang_cc1 -frecovery-ast -verify %s
6 : Y(foo()) {} // expected-error {{use of undeclared identifier 'foo'}}
8 // no crash on evaluating the constexpr ctor.
9 constexpr int Z
= X().Y
; // expected-error {{constexpr variable 'Z' must be initialized by a constant expression}}
12 int Y
= foo(); // expected-error {{use of undeclared identifier 'foo'}}
19 : Y(({foo();})) {} // expected-error {{use of undeclared identifier 'foo'}}
22 struct CycleDelegate
{
25 : Y(foo()) {} // expected-error {{use of undeclared identifier 'foo'}}
26 // no bogus "delegation cycle" diagnostic
27 CycleDelegate(float) : CycleDelegate(1) {}
31 int* p
= new int(invalid()); // expected-error {{use of undeclared identifier}}
33 // no crash on evaluating the CXXDefaultInitExpr.
34 constexpr int* s
= X4().p
; // expected-error {{must be initialized by}}