1 // RUN: %clang_cc1 -std=c++03 -verify=expected,both %s -fexperimental-new-constant-interpreter
2 // RUN: %clang_cc1 -std=c++03 -verify=ref,both %s
4 namespace NonInitializingMemberExpr
{
9 __attribute__((require_constant_initialization
)) const int &nl_subobj_ref
= NonLit().value
; // both-error {{variable does not have a constant initializer}} \
10 // both-note {{required by}} \
11 // both-note {{subexpression not valid}}
15 namespace NonLValueMemberExpr
{
20 #define ATTR __attribute__((require_constant_initialization))
22 ATTR
static const int &subobj_init
;
25 const int &TT1::subobj_init
= PODType().value
;
28 void LambdaAccessingADummy() {
30 int a9
[1] = {[d
= 0] = 1}; // both-error {{is not an integral constant expression}}