diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-09 08:23:23 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-09 08:23:23 +0000 |
| commit | 45855df4c67960da662e8777ff520f2f0f07c5bd (patch) | |
| tree | f9b4461935be0916dca5a75af1a35660cd6bc352 /clang/test/SemaCXX/member-init.cpp | |
| parent | 28540adfcf0ec6eab41c812dfae337199f7fa641 (diff) | |
| download | bcm5719-llvm-45855df4c67960da662e8777ff520f2f0f07c5bd.tar.gz bcm5719-llvm-45855df4c67960da662e8777ff520f2f0f07c5bd.zip | |
Recover properly if a class member declaration starts with a scope specifier
or template-id which can't be parsed.
llvm-svn: 156468
Diffstat (limited to 'clang/test/SemaCXX/member-init.cpp')
| -rw-r--r-- | clang/test/SemaCXX/member-init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/member-init.cpp b/clang/test/SemaCXX/member-init.cpp index c93c85bbf89..3ca41a05633 100644 --- a/clang/test/SemaCXX/member-init.cpp +++ b/clang/test/SemaCXX/member-init.cpp @@ -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}} |

