]> granicus.if.org Git - clang/commitdiff
Add test of enumerator types
authorDouglas Gregor <dgregor@apple.com>
Fri, 12 Dec 2008 07:27:10 +0000 (07:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 12 Dec 2008 07:27:10 +0000 (07:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60940 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/enum.cpp [new file with mode: 0644]

diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
new file mode 100644 (file)
index 0000000..7c44056
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: clang -fsyntax-only -verify %s
+
+enum E {
+  Val1,
+  Val2
+};
+
+int& enumerator_type(int);
+float& enumerator_type(E);
+
+void f() {
+  E e = Val1;
+  float& fr = enumerator_type(Val2);
+}