1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include "config_clang.h"
13 // expected-note@+3 {{type declared here [loplugin:moveit]}}
14 // expected-note@+2 {{type declared here [loplugin:moveit]}}
15 // expected-note@+1 {{type declared here [loplugin:moveit]}}
18 std::shared_ptr
<int> x
;
30 // expected-note@+1 {{passing to this param [loplugin:moveit]}}
31 void call_by_value(Movable
);
34 // expected-note@+1 {{local var declared here [loplugin:moveit]}}
36 // expected-error@+1 {{can std::move this var into this param [loplugin:moveit]}}
46 // expected-note@+1 {{passing to this param [loplugin:moveit]}}
50 // expected-note@+1 {{local var declared here [loplugin:moveit]}}
52 // expected-error@+1 {{can std::move this var into this param [loplugin:moveit]}}
63 // expected-note@+1 {{passing to this param [loplugin:moveit]}}
67 // expected-note@+1 {{local var declared here [loplugin:moveit]}}
69 // expected-error@+1 {{can std::move this var into this param [loplugin:moveit]}}
76 // No error expected, because referencing after call
91 // No error expected, because constructing temporary(i.e. rvalue) to pass to param
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */