| // RUN: %clang_cc1 -fsyntax-only -Wself-move -std=c++11 -verify %s |
| // definitions for std::move |
| template <class T> struct remove_reference { typedef T type; }; |
| template <class T> struct remove_reference<T&> { typedef T type; }; |
| template <class T> struct remove_reference<T&&> { typedef T type; }; |
| template <class T> typename remove_reference<T>::type &&move(T &&t); |
| x = std::move(x); // expected-warning{{explicitly moving}} |
| (x) = std::move(x); // expected-warning{{explicitly moving}} |
| x = move(x); // expected-warning{{explicitly moving}} |
| global = std::move(global); // expected-warning{{explicitly moving}} |
| (global) = std::move(global); // expected-warning{{explicitly moving}} |
| global = move(global); // expected-warning{{explicitly moving}} |
| field_test(field_test&& other) { |
| x = std::move(x); // expected-warning{{explicitly moving}} |
| other.x = std::move(other.x); // expected-warning{{explicitly moving}} |
| struct C { C() {}; ~C() {} }; |
| a = std::move(a); // expected-warning{{explicitly moving}} |
| b = std::move(b); // expected-warning{{explicitly moving}} |
| b.a = std::move(b.a); // expected-warning{{explicitly moving}} |
| c = std::move(c); // expected-warning{{explicitly moving}} |