summaryrefslogtreecommitdiff
path: root/test/Parser/cxx0x-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx0x-decl.cpp')
-rw-r--r--test/Parser/cxx0x-decl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
index 2b253c019c971..7bd82e8220bec 100644
--- a/test/Parser/cxx0x-decl.cpp
+++ b/test/Parser/cxx0x-decl.cpp
@@ -79,7 +79,7 @@ enum E
namespace PR5066 {
using T = int (*f)(); // expected-error {{type-id cannot have a name}}
template<typename T> using U = int (*f)(); // expected-error {{type-id cannot have a name}}
- auto f() -> int (*f)(); // expected-error {{type-id cannot have a name}}
+ auto f() -> int (*f)(); // expected-error {{only variables can be initialized}} expected-error {{expected ';'}}
auto g = []() -> int (*f)() {}; // expected-error {{type-id cannot have a name}}
}
@@ -130,15 +130,18 @@ namespace AliasDeclEndLocation {
using B = AliasDeclEndLocation::A<int
> // expected-error {{expected ';' after alias declaration}}
+;
- // FIXME: After splitting this >> into two > tokens, we incorrectly determine
- // the end of the template-id to be after the *second* '>'.
- // Perhaps we could synthesize an expansion FileID containing '> >' to fix this?
using C = AliasDeclEndLocation::A<int
>\
> // expected-error {{expected ';' after alias declaration}}
;
using D = AliasDeclEndLocation::A<int
> // expected-error {{expected ';' after alias declaration}}
+ // FIXME: After splitting this >> into two > tokens, we incorrectly determine
+ // the end of the template-id to be after the *second* '>'.
+ using E = AliasDeclEndLocation::A<int>>;
+#define GGG >>>
+ using F = AliasDeclEndLocation::A<int GGG;
+ // expected-error@-1 {{expected ';' after alias declaration}}
B something_else;
}