diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-15 00:10:11 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-15 00:10:11 +0000 |
commit | 78cf9a26d27349a7b9ae83a0b7d5451571b9b41e (patch) | |
tree | c9722742c44988c01f93e10cbcba07c084c1e8ae /test/SemaCXX/conversion-function.cpp | |
parent | d3509faadc1026e4f1f0671e008b91609a498983 (diff) |
Issue a good diagnostics when attempt to select
a type convesion function results in ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 37ffc1bb53..6182678e31 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -79,16 +79,16 @@ void f(const C& c) { // 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(); } |