diff options
Diffstat (limited to 'test/SemaCXX/overload-call.cpp')
-rw-r--r-- | test/SemaCXX/overload-call.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp index d20bf23..12dc5da 100644 --- a/test/SemaCXX/overload-call.cpp +++ b/test/SemaCXX/overload-call.cpp @@ -333,3 +333,17 @@ namespace test2 { inline bool operator!=(const qrgb666 &v) const { return !(*this == v); } }; } + +// PR 6117 +namespace test3 { + struct Base {}; + struct Incomplete; + + void foo(Base *); // expected-note 2 {{cannot convert argument of incomplete type}} + void foo(Base &); // expected-note 2 {{cannot convert argument of incomplete type}} + + void test(Incomplete *P) { + foo(P); // expected-error {{no matching function for call to 'foo'}} + foo(*P); // expected-error {{no matching function for call to 'foo'}} + } +} |