blob: 08b3cd4cc71690b39e9f1bc1bf1e456c2fc5e601 [file] [log] [blame]
Anders Carlssone30572a2009-09-10 23:18:36 +00001// RUN: clang-cc -fsyntax-only -verify %s
2struct T {
3 void f();
4};
5
6struct A {
7 T* operator->(); // expected-note{{candidate function}}
8};
9
10struct B {
11 T* operator->(); // expected-note{{candidate function}}
12};
13
14struct C : A, B {
15};
16
17struct D : A { };
18
Eli Friedmanf43fb722009-11-18 01:28:03 +000019struct E; // expected-note {{forward declaration of 'struct E'}}
20
21void f(C &c, D& d, E& e) {
Anders Carlssone30572a2009-09-10 23:18:36 +000022 c->f(); // expected-error{{use of overloaded operator '->' is ambiguous}}
23 d->f();
Eli Friedmanf43fb722009-11-18 01:28:03 +000024 e->f(); // expected-error{{incomplete definition of type}}
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000025}