diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-14 05:08:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-14 05:08:22 +0000 |
commit | 05cfc295f45dae510104f56d4ee6cb94206c3799 (patch) | |
tree | a479564ec4d2a0f2bc76498bc0e69840b6f9354d /clang/test/Parser/namespaces.cpp | |
parent | f3d3ae665cdb8cdd72ecab587929321a1dae6290 (diff) | |
download | bcm5719-llvm-05cfc295f45dae510104f56d4ee6cb94206c3799.tar.gz bcm5719-llvm-05cfc295f45dae510104f56d4ee6cb94206c3799.zip |
Namespaces can only be defined at global or namespace scope. Fixes PR6596.
llvm-svn: 103767
Diffstat (limited to 'clang/test/Parser/namespaces.cpp')
-rw-r--r-- | clang/test/Parser/namespaces.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Parser/namespaces.cpp b/clang/test/Parser/namespaces.cpp new file mode 100644 index 00000000000..b8c7819a019 --- /dev/null +++ b/clang/test/Parser/namespaces.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR6596 +namespace g { enum { o = 0 }; } + +void foo() { + namespace a { typedef g::o o; } // expected-error{{namespaces can only be defined in global or namespace scope}} +} |