From f8c2a33b6e47c494b83e68f02f4ee67ca8fd8e3b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 30 Dec 2011 03:11:50 +0000 Subject: Revert r147271. This fixes PR11676. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147362 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/special/class.ctor/p6-0x.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'test/CXX/special/class.ctor') diff --git a/test/CXX/special/class.ctor/p6-0x.cpp b/test/CXX/special/class.ctor/p6-0x.cpp index 71afd244bd..19e324d8df 100644 --- a/test/CXX/special/class.ctor/p6-0x.cpp +++ b/test/CXX/special/class.ctor/p6-0x.cpp @@ -8,16 +8,8 @@ struct NonConstexpr1 { // expected-note {{here}} struct NonConstexpr2 { // expected-note {{here}} NonConstexpr1 nl; }; -struct NonConstexpr2a : NonConstexpr1 { }; -constexpr NonConstexpr1 nc1 = NonConstexpr1(); // ok, does not call constructor -constexpr NonConstexpr2 nc2 = NonConstexpr2(); // ok, does not call constructor -constexpr NonConstexpr2a nc2a = NonConstexpr2a(); // expected-error {{constant expression}} expected-note {{non-literal type 'const NonConstexpr2a'}} -constexpr int nc2_a = NonConstexpr2().nl.a; // ok -constexpr int nc2a_a = NonConstexpr2a().a; // ok -struct Helper { - friend constexpr NonConstexpr1::NonConstexpr1(); // expected-error {{follows non-constexpr declaration}} - friend constexpr NonConstexpr2::NonConstexpr2(); // expected-error {{follows non-constexpr declaration}} -}; +constexpr NonConstexpr1 nc1 = NonConstexpr1(); // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr1'}} +constexpr NonConstexpr2 nc2 = NonConstexpr2(); // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr2'}} struct Constexpr1 {}; constexpr Constexpr1 c1 = Constexpr1(); // ok -- cgit v1.2.3