summaryrefslogtreecommitdiff
path: root/clang/test/CXX/dcl.decl/dcl.name/p1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/dcl.decl/dcl.name/p1.cpp')
-rw-r--r--clang/test/CXX/dcl.decl/dcl.name/p1.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CXX/dcl.decl/dcl.name/p1.cpp b/clang/test/CXX/dcl.decl/dcl.name/p1.cpp
new file mode 100644
index 0000000..9838b4f
--- /dev/null
+++ b/clang/test/CXX/dcl.decl/dcl.name/p1.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+namespace pr6200 {
+ struct v {};
+ enum E { e };
+ struct s {
+ int i;
+ operator struct v() { return v(); };
+ operator enum E() { return e; }
+ };
+
+ void f()
+ {
+ // None of these is a declaration.
+ (void)new struct s;
+ (void)new enum E;
+ (void)&s::operator struct v;
+ (void)&s::operator enum E;
+ }
+}