1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -std=c++23 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -std=c++20 -fsyntax-only -verify %s
3 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -std=c++11 -fsyntax-only -verify %s
12 X
return_by_move(int i
, X x
) {
22 void throw_move_only(X x
) {
32 X(const X
&) = delete; // expected-note 2{{'X' has been explicitly marked deleted here}}
41 throw x
; // expected-error{{call to deleted constructor of 'X'}}
53 throw x
; // expected-error{{call to deleted constructor of 'PR10142::X'}}
58 template void f2
<X
>(int); // expected-note{{in instantiation of function template specialization 'PR10142::f2<PR10142::X>' requested here}}