p33-0x.cpp revision abea951c34876a5374d0e3678c7989b225c5c895
1// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -std=c++0x -fsyntax-only -verify %s 2class X { 3 X(const X&); 4 5public: 6 X(); 7 X(X&&); 8}; 9 10X return_by_move(int i, X x) { 11 X x2; 12 if (i == 0) 13 return x; 14 else if (i == 1) 15 return x2; 16 else 17 return x; 18} 19 20void throw_move_only(X x) { 21 X x2; 22 throw x; 23 throw x2; 24} 25 26