aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/ambig-user-defined-convesions.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaCXX/ambig-user-defined-convesions.cpp b/test/SemaCXX/ambig-user-defined-convesions.cpp
new file mode 100644
index 0000000000..d391a04d07
--- /dev/null
+++ b/test/SemaCXX/ambig-user-defined-convesions.cpp
@@ -0,0 +1,19 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+struct BASE {
+ operator int &(); // expected-note {{candidate function}}
+};
+struct BASE1 {
+ operator int &(); // expected-note {{candidate function}}
+};
+
+struct B : public BASE, BASE1 {
+
+};
+
+extern B f();
+
+const int main() {
+ return f(); // expected-error {{conversion from 'struct B' to 'int const' is ambiguous}}
+}
+