diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-03-18 22:52:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-03-18 22:52:47 +0000 |
commit | b1402ae94eb7ca0f52b358aaf8eae13247114bf7 (patch) | |
tree | 14940f4e599b70f7381b2332c39c3aa13a990799 /clang/test/Parser/cxx-class.cpp | |
parent | ae0052f114cc43c9ddcf03e6d016f7de0b0edcc2 (diff) | |
download | bcm5719-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.cpp | 11 |
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 |