| // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -Wno-uninitialized |
| operator A(); // expected-note {{candidate function}} |
| operator A(); // expected-note {{candidate function}} |
| class B : public BASE , public BASE1 |
| const int& ri = (void)0; // expected-error {{reference to type 'const int' could not bind to an rvalue of type 'void'}} |
| const A& rca = f(); // expected-error {{reference initialization of type 'const A &' with initializer of type 'B' is ambiguous}} |
| A& ra = f(); // expected-error {{non-const lvalue reference to type 'A' cannot bind to a temporary of type 'B'}} |
| struct PR6139 { A (&x)[1]; }; |
| PR6139 x = {{A()}}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to an initializer list temporary}} |
| struct PR6139b { A (&x)[1]; }; |
| PR6139b y = {A()}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to a temporary of type 'A'}} |
| struct A { int &&temporary; int x, y; }; |
| const A &c = { 10, ++c.temporary }; |