summaryrefslogtreecommitdiff
path: root/clang/test/Parser/namespaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/namespaces.cpp')
-rw-r--r--clang/test/Parser/namespaces.cpp8
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 0000000..b8c7819
--- /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}}
+}