• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 // expected-no-diagnostics
3 
4 enum class Color { Red, Green, Blue };
5 
6 struct ConvertsToColorA {
7   operator Color();
8 };
9 
10 struct ConvertsToColorB {
11   operator Color();
12 };
13 
foo(bool cond,ConvertsToColorA ca,ConvertsToColorB cb)14 Color foo(bool cond, ConvertsToColorA ca, ConvertsToColorB cb) {
15   return cond? ca : cb;
16 }
17