1 // RUN: %clang_cc1 -fsyntax-only -verify %s
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 
19 struct E; // expected-note {{forward declaration of 'E'}}
20 
21 void f(C &c, D& d, E& e) {
22   c->f(); // expected-error{{use of overloaded operator '->' is ambiguous}}
23   d->f();
24   e->f(); // expected-error{{incomplete definition of type}}
25 }
26 
27 // rdar://8875304
28 namespace rdar8875304 {
29 class Point {};
30 class Line_Segment{ public: Line_Segment(const Point&){} };
31 class Node { public: Point Location(){ Point p; return p; } };
32 
33 void f()
34 {
35    Node** node1;
36    Line_Segment(node1->Location()); // expected-error {{not a structure or union}}
37 }
38 }
39