Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Anders Carlsson | e30572a | 2009-09-10 23:18:36 +0000 | [diff] [blame] | 2 | struct T { |
| 3 | void f(); |
| 4 | }; |
| 5 | |
| 6 | struct A { |
| 7 | T* operator->(); // expected-note{{candidate function}} |
| 8 | }; |
| 9 | |
| 10 | struct B { |
| 11 | T* operator->(); // expected-note{{candidate function}} |
| 12 | }; |
| 13 | |
| 14 | struct C : A, B { |
| 15 | }; |
| 16 | |
| 17 | struct D : A { }; |
| 18 | |
John McCall | 7c2342d | 2010-03-10 11:27:22 +0000 | [diff] [blame] | 19 | struct E; // expected-note {{forward declaration of 'E'}} |
Eli Friedman | f43fb72 | 2009-11-18 01:28:03 +0000 | [diff] [blame] | 20 | |
| 21 | void f(C &c, D& d, E& e) { |
Anders Carlsson | e30572a | 2009-09-10 23:18:36 +0000 | [diff] [blame] | 22 | c->f(); // expected-error{{use of overloaded operator '->' is ambiguous}} |
| 23 | d->f(); |
Eli Friedman | f43fb72 | 2009-11-18 01:28:03 +0000 | [diff] [blame] | 24 | e->f(); // expected-error{{incomplete definition of type}} |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 25 | } |