Index: test/Parser/overloaded-pointer-vs-reference-hint.cpp =================================================================== --- /dev/null +++ test/Parser/overloaded-pointer-vs-reference-hint.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +class A; + +void f0(A *a); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'A' to 'A *' for 1st argument; take the address of the argument with &}} +void f1(A &a) { + f0(a); // expected-error {{no matching function for call to 'f0'}} +} + +void f2(A &a); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'A *' to 'A &' for 1st argument; dereference the argument with *}} +void f3(A *a) { + f2(a); // expected-error {{no matching function for call to 'f2'}} +} + +