aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/arrow-operator.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
commit4c8b24812ddcd1dedaca343a6d4e76f91f398981 (patch)
tree137ebebcae16fb0ce7ab4af456992bbd8d22fced /test/SemaCXX/arrow-operator.cpp
parent5362a71c02e7d448a8ce98cf00c47e353fba5d04 (diff)
Notes
Diffstat (limited to 'test/SemaCXX/arrow-operator.cpp')
-rw-r--r--test/SemaCXX/arrow-operator.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/SemaCXX/arrow-operator.cpp b/test/SemaCXX/arrow-operator.cpp
new file mode 100644
index 000000000000..9c46e96afc0b
--- /dev/null
+++ b/test/SemaCXX/arrow-operator.cpp
@@ -0,0 +1,22 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+struct T {
+ void f();
+};
+
+struct A {
+ T* operator->(); // expected-note{{candidate function}}
+};
+
+struct B {
+ T* operator->(); // expected-note{{candidate function}}
+};
+
+struct C : A, B {
+};
+
+struct D : A { };
+
+void f(C &c, D& d) {
+ c->f(); // expected-error{{use of overloaded operator '->' is ambiguous}}
+ d->f();
+} \ No newline at end of file