summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/ref-init-ambiguous.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/ref-init-ambiguous.cpp')
-rw-r--r--test/SemaCXX/ref-init-ambiguous.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/SemaCXX/ref-init-ambiguous.cpp b/test/SemaCXX/ref-init-ambiguous.cpp
index dda1ead..6062099 100644
--- a/test/SemaCXX/ref-init-ambiguous.cpp
+++ b/test/SemaCXX/ref-init-ambiguous.cpp
@@ -3,18 +3,19 @@
enum E2 { };
struct A {
- operator E2&(); // expected-note 3 {{candidate function}}
+ operator E2&(); // expected-note 2 {{candidate function}}
};
struct B {
- operator E2&(); // expected-note 3 {{candidate function}}
+ operator E2&(); // expected-note 2 {{candidate function}}
};
struct C : B, A {
};
void test(C c) {
- const E2 &e2 = c; // expected-error {{reference initialization of type 'enum E2 const &' with initializer of type 'struct C' is ambiguous}}
+ // FIXME: state that there was an ambiguity in the conversion!
+ const E2 &e2 = c; // expected-error {{reference to type 'enum E2 const' could not bind to an lvalue of type 'struct C'}}
}
void foo(const E2 &);
OpenPOWER on IntegriCloud