1 // RUN: %clang_cc1 -fsyntax-only -verify -Wall -std=c++11 %s -Wno-unused-value
8 T
&&move(T
&&x
) { return x
; }
9 template <typename T
, typename U
>
10 void move(T
&&, U
&&) {}
12 inline namespace __1
{
14 T
&forward(T
&x
) { return x
; }
28 move(i
); // expected-warning{{unqualified call to 'std::move'}}
29 (move
)(i
); // expected-warning{{unqualified call to 'std::move'}}
34 forward
<int>(i
); // expected-warning{{unqualified call to 'std::forward'}}
41 move(foo
); // expected-warning{{unqualified call to 'std::move}}
43 std::forward
<decltype(foo
)>(foo
);
44 forward
<decltype(foo
)>(foo
); // expected-warning{{unqualified call to 'std::forward}}
50 g(0); //expected-note {{here}}
62 move(i
); // expected-warning{{unqualified call to 'std::move}}
64 forward
<int>(i
); // expected-warning{{unqualified call to 'std::forward}}
69 move(foo
); // expected-warning{{unqualified call to 'std::move}}
70 forward
<decltype(foo
)>(foo
); // expected-warning{{unqualified call to 'std::forward}}
71 (forward
<decltype(foo
)>)(foo
); // expected-warning{{unqualified call to 'std::forward}}
76 g(0); //expected-note {{here}}
89 } // namespace overload
93 move(std::foo
{}); // expected-warning{{unqualified call to 'std::move}}
102 move(i
); // expected-warning{{unqualified call to 'std::move}}
103 forward
<int>(i
); // expected-warning{{unqualified call to 'std::forward}}
108 namespace test_alias
{
109 namespace alias
= std
;
110 using namespace alias
;
113 move(i
); // expected-warning{{unqualified call to 'std::move}}
115 forward
<int>(i
); // expected-warning{{unqualified call to 'std::forward}}
118 } // namespace test_alias