Issue a good diagnostics when attempt to select
a type convesion function results in ambiguity.
llvm-svn: 81812
diff --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp
index 37ffc1b..6182678 100644
--- a/clang/test/SemaCXX/conversion-function.cpp
+++ b/clang/test/SemaCXX/conversion-function.cpp
@@ -79,16 +79,16 @@
// Test. Conversion in base class is visible in derived class.
class XB {
public:
- operator int();
+ operator int(); // expected-note {{candidate function}}
};
class Yb : public XB {
public:
- operator char();
+ operator char(); // expected-note {{candidate function}}
};
void f(Yb& a) {
- if (a) { } // expected-error {{value of type 'class Yb' is not contextually convertible to 'bool'}}
+ if (a) { } // expected-error {{conversion from 'class Yb' to 'bool' is ambiguous}}
int i = a; // OK. calls XB::operator int();
char ch = a; // OK. calls Yb::operator char();
}