diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-30 03:11:50 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-30 03:11:50 +0000 |
commit | f8c2a33b6e47c494b83e68f02f4ee67ca8fd8e3b (patch) | |
tree | 6194f3b0d54211c78b495dd8d14e1d69a3041679 /test/CXX/special/class.ctor | |
parent | d7c56e1114bfe7d461786903bb720d2c6efc05a1 (diff) |
Revert r147271. This fixes PR11676.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/special/class.ctor')
-rw-r--r-- | test/CXX/special/class.ctor/p6-0x.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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 |