summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-03-18 22:52:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-03-18 22:52:47 +0000
commitb1402ae94eb7ca0f52b358aaf8eae13247114bf7 (patch)
tree14940f4e599b70f7381b2332c39c3aa13a990799 /clang/test/Parser/cxx-class.cpp
parentae0052f114cc43c9ddcf03e6d016f7de0b0edcc2 (diff)
downloadbcm5719-llvm-b1402ae94eb7ca0f52b358aaf8eae13247114bf7.tar.gz
bcm5719-llvm-b1402ae94eb7ca0f52b358aaf8eae13247114bf7.zip
Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.
llvm-svn: 177335
Diffstat (limited to 'clang/test/Parser/cxx-class.cpp')
-rw-r--r--clang/test/Parser/cxx-class.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp
index 8ed5882a282..5fac7972857 100644
--- a/clang/test/Parser/cxx-class.cpp
+++ b/clang/test/Parser/cxx-class.cpp
@@ -88,6 +88,17 @@ namespace ctor_error {
// expected-error{{unknown type name 'UnknownType'}}
}
+namespace nns_decl {
+ struct A {
+ struct B;
+ };
+ namespace N {
+ union C;
+ }
+ struct A::B; // expected-error {{forward declaration of struct cannot have a nested name specifier}}
+ union N::C; // expected-error {{forward declaration of union cannot have a nested name specifier}}
+}
+
// PR13775: Don't assert here.
namespace PR13775 {
class bar
OpenPOWER on IntegriCloud