aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/namespaces.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
commitd7279c4c177bca357ef96ff1379fd9bc420bfe83 (patch)
tree3558f327a6f9ab59c5d7a06528d84e1560445247 /test/Parser/namespaces.cpp
parentbe17651f5cd2e94922c1b732bc8589e180698193 (diff)
Notes
Diffstat (limited to 'test/Parser/namespaces.cpp')
-rw-r--r--test/Parser/namespaces.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/namespaces.cpp b/test/Parser/namespaces.cpp
new file mode 100644
index 000000000000..b8c7819a019f
--- /dev/null
+++ b/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}}
+}