diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Parser/cxx-decl.cpp | 14 | ||||
-rw-r--r-- | test/Parser/cxx0x-decl.cpp | 25 |
2 files changed, 38 insertions, 1 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index aa775c8c76..ee292fdae0 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -134,7 +134,7 @@ struct S { namespace TestIsValidAfterTypeSpecifier { -struct s {}; +struct s {} v; namespace a { struct s operator++(struct s a) @@ -148,6 +148,18 @@ operator++(struct s a) { return a; } } +struct X { + struct s + friend f(); + struct s + virtual f(); +}; + +struct s +&r0 = v; +struct s +bitand r2 = v; + } // PR8380 diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp index 1da7dd2833..b9441fd681 100644 --- a/test/Parser/cxx0x-decl.cpp +++ b/test/Parser/cxx0x-decl.cpp @@ -49,3 +49,28 @@ struct ConstexprTrailingReturn { constexpr auto f() -> decltype((n)); }; constexpr const int &ConstexprTrailingReturn::f() const { return n; } + +namespace TestIsValidAfterTypeSpecifier { +struct s {} v; + +// FIXME: We should accept this once we support thread_local. +struct s +thread_local tl; // expected-error {{expected unqualified-id}} + +struct s +&r0 = v; + +struct s +&&r1 = s(); + +struct s +bitand r2 = v; + +struct s +and r3 = s(); + +enum E {}; +enum E +[[]] e; + +} |