summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/member-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/member-init.cpp')
-rw-r--r--test/SemaCXX/member-init.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/member-init.cpp b/test/SemaCXX/member-init.cpp
index 819c8d1..c93c85b 100644
--- a/test/SemaCXX/member-init.cpp
+++ b/test/SemaCXX/member-init.cpp
@@ -29,6 +29,9 @@ 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}}
+ // 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}}
};
struct ThrowCtor { ThrowCtor(int) noexcept(false); };
OpenPOWER on IntegriCloud