diff options
Diffstat (limited to 'clang/test/SemaCXX/overload-call.cpp')
| -rw-r--r-- | clang/test/SemaCXX/overload-call.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/overload-call.cpp b/clang/test/SemaCXX/overload-call.cpp index 8d12c9bd411..6bf6965e46b 100644 --- a/clang/test/SemaCXX/overload-call.cpp +++ b/clang/test/SemaCXX/overload-call.cpp @@ -236,6 +236,12 @@ void intref_test() { float* ir2 = intref(5.5); } +void derived5(C&); // expected-note{{candidate function not viable: cannot bind base class object of type 'A' to derived class reference 'C &' for 1st argument}} + +void test_base(A& a) { + derived5(a); // expected-error{{no matching function for call to 'derived5}} +} + // Test reference binding vs. standard conversions. int& bind_vs_conv(const double&); float& bind_vs_conv(int); |

