summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:22:18 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-23 14:22:18 +0000
commit5563df30b9c8d1fe87a54baae0d6bd86642563f4 (patch)
tree3fdd91eae574e32453a4baf462961c742df2691a /test/SemaCXX/ambiguous-builtin-unary-operator.cpp
parente5557c18e5d41b4b62f2af8a24af20eba40b0225 (diff)
downloadFreeBSD-src-5563df30b9c8d1fe87a54baae0d6bd86642563f4.zip
FreeBSD-src-5563df30b9c8d1fe87a54baae0d6bd86642563f4.tar.gz
Update clang to r84949.
Diffstat (limited to 'test/SemaCXX/ambiguous-builtin-unary-operator.cpp')
-rw-r--r--test/SemaCXX/ambiguous-builtin-unary-operator.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaCXX/ambiguous-builtin-unary-operator.cpp b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
index 042546a..5affd19 100644
--- a/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
+++ b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
@@ -2,17 +2,33 @@
struct A {
operator int&();
+ operator long*& ();
};
struct B {
operator long&();
+ operator int*& ();
};
struct C : B, A { };
void test(C c) {
++c; // expected-error {{use of overloaded operator '++' is ambiguous}}\
- // expected-note 4 {{built-in candidate operator ++ (}}
+ // expected-note {{built-in candidate operator++(int &)}} \
+ // expected-note {{built-in candidate operator++(long &)}} \
+ // expected-note {{built-in candidate operator++(long *&)}} \
+ // expected-note {{built-in candidate operator++(int *&)}}
}
+struct A1 { operator volatile int&(); };
+
+struct B1 { operator volatile long&(); };
+
+struct C1 : B1, A1 { };
+
+void test(C1 c) {
+ ++c; // expected-error {{use of overloaded operator '++' is ambiguous}} \
+ // expected-note {{built-in candidate operator++(int volatile &)}} \
+ // expected-note {{built-in candidate operator++(long volatile &)}}
+}
OpenPOWER on IntegriCloud