aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx-decl.cpp')
-rw-r--r--test/Parser/cxx-decl.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index 5a4c9da0f6..aa775c8c76 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -132,6 +132,24 @@ struct S {
typedef S() : n(1), m(2) { } // expected-error {{function definition declared 'typedef'}}
};
+
+namespace TestIsValidAfterTypeSpecifier {
+struct s {};
+
+namespace a {
+struct s operator++(struct s a)
+{ return a; }
+}
+
+namespace b {
+// The newline after s should make no difference.
+struct s
+operator++(struct s a)
+{ return a; }
+}
+
+}
+
// PR8380
extern "" // expected-error {{unknown linkage language}}
test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \