diff options
Diffstat (limited to 'test/SemaCXX/member-init.cpp')
-rw-r--r-- | test/SemaCXX/member-init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/member-init.cpp b/test/SemaCXX/member-init.cpp index c93c85b..a13941f 100644 --- a/test/SemaCXX/member-init.cpp +++ b/test/SemaCXX/member-init.cpp @@ -14,7 +14,7 @@ public: bool b(); int k; struct Recurse { - int &n = b() ? Recurse().n : k; // ok + int &n = b() ? Recurse().n : k; // expected-error {{defaulted default constructor of 'Recurse' cannot be used by non-static data member initializer which appears before end of class definition}} }; struct UnknownBound { @@ -28,7 +28,7 @@ template<> struct T<2> { template<int C, int D> using B = int; }; const int C = 0, D = 0; struct S { int as[] = { decltype(x)::B<C, D>(0) }; // expected-error {{array bound cannot be deduced from an in-class initializer}} - T<sizeof(as) / sizeof(int)> x; // expected-error {{requires a type specifier}} + T<sizeof(as) / sizeof(int)> x; // test that we handle invalid array bound deductions without crashing when the declarator name is itself invalid operator int[](){}; // expected-error {{'operator int' cannot be the name of a variable or data member}} \ // expected-error {{array bound cannot be deduced from an in-class initializer}} |