// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
// Implicitly-defined default constructors are constexpr if the implicit
// definition would be.
;
;
;
constexpr NonConstexpr1 nc1 = ; // ok, does not call constructor
constexpr NonConstexpr2 nc2 = ; // ok, does not call constructor
constexpr NonConstexpr2a nc2a = ; // ok, does not call constructor
constexpr int nc2_a = .nl.a; // ok
constexpr int nc2a_a = .a; // ok
;
;
constexpr Constexpr1 c1 = ; // ok
; // expected-note {{struct with virtual base}} expected-note {{declared here}}
constexpr NonConstexpr3 nc3 = ; // expected-error {{non-literal type 'const NonConstexpr3'}}
;
constexpr Constexpr2 c2 = ; // ok
int n;
;
;
constexpr NonConstexpr4 nc4 = ; // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr4'}}
;
constexpr Constexpr3 c3 = ; // ok
;
constexpr Constexpr4 c4 = ; // ok
// This rule breaks some legal C++98 programs!
; // expected-note {{here}}
;