p33-0x.cpp revision 72dfa27b415b15157a9d1fc33b6ed21f0085bed2
1// RUN: %clang_cc1 -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