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.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
index d912e19287be..2b253c019c97 100644
--- a/test/Parser/cxx0x-decl.cpp
+++ b/test/Parser/cxx0x-decl.cpp
@@ -123,6 +123,25 @@ namespace ColonColonDecltype {
::decltype(S())::T invalid; // expected-error {{expected unqualified-id}}
}
+namespace AliasDeclEndLocation {
+ template<typename T> struct A {};
+ // Ensure that we correctly determine the end of this declaration to be the
+ // end of the annotation token, not the beginning.
+ 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}}
+ B something_else;
+}
+
struct Base { virtual void f() = 0; virtual void g() = 0; virtual void h() = 0; };
struct MemberComponentOrder : Base {
void f() override __asm__("foobar") __attribute__(( )) {}