summaryrefslogtreecommitdiff
path: root/clang/test/CXX/over/over.built/p25.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/over/over.built/p25.cpp')
-rw-r--r--clang/test/CXX/over/over.built/p25.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CXX/over/over.built/p25.cpp b/clang/test/CXX/over/over.built/p25.cpp
new file mode 100644
index 0000000..aea3854
--- /dev/null
+++ b/clang/test/CXX/over/over.built/p25.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+
+enum class Color { Red, Green, Blue };
+
+struct ConvertsToColorA {
+ operator Color();
+};
+
+struct ConvertsToColorB {
+ operator Color();
+};
+
+Color foo(bool cond, ConvertsToColorA ca, ConvertsToColorB cb) {
+ return cond? ca : cb;
+}