From 93afb0d4f9f2ec322438c3bb7e1114ea6f614510 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 12 Dec 2008 07:27:10 +0000 Subject: [PATCH] Add test of enumerator types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60940 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/enum.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/SemaCXX/enum.cpp diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp new file mode 100644 index 0000000000..7c44056e49 --- /dev/null +++ b/test/SemaCXX/enum.cpp @@ -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); +} -- 2.40.0