diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-19 17:02:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-19 17:02:01 +0000 |
commit | 06ebc98ff017fadfaed515bc06f50ce94ca468d6 (patch) | |
tree | ea913db3f33c5ccda8859e96a57434ed08e5c6e0 /test/SemaCXX/conversion-function.cpp | |
parent | b2842aa3a76b53033e1619c494e972cdbe190939 (diff) |
We don't actually need to check the implicit object argument's
conversion a second time for a conversion candidate (with the real
acting context), because the only problems we would find are access or
ambiguity issues that won't be diagnosed until we pick this
candidate. Add a test case to prove it to myself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 3d544ae03c..07281e16d3 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -306,4 +306,22 @@ namespace rdar8018274 { void test2(UeberDerived ud) { int i = ud; // expected-error{{ambiguous conversion from derived class 'rdar8018274::SuperDerived' to base class 'rdar8018274::Base'}} } + + struct Base2 { + operator int(); + }; + + struct Base3 { + operator int(); + }; + + struct Derived23 : Base2, Base3 { + using Base2::operator int; + }; + + struct ExtraDerived23 : Derived23 { }; + + void test3(ExtraDerived23 ed) { + int i = ed; + } } |