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/.
16 // expected-error@+1 {{move constructor can be noexcept [loplugin:noexceptmove]}}
17 Mapping(Mapping
&& other
)
18 : m_pMapping(other
.m_pMapping
)
20 other
.m_pMapping
= nullptr;
23 // expected-error@+1 {{move operator= can be noexcept [loplugin:noexceptmove]}}
24 Mapping
& operator=(Mapping
&& other
)
26 m_pMapping
= other
.m_pMapping
;
27 other
.m_pMapping
= nullptr;
33 // No warning expected, because calling throwing function.
36 void foo() noexcept(false);
44 // no warning expected, because calling throwing constructor
49 Foo() noexcept(false);
53 Bar(Bar
&&) { Foo aFoo
; }
64 // No warning expected, because calling throwing destructor.
69 ~Foo() noexcept(false);
74 Bar(Bar
&&) { Foo aFoo
; }
78 // Check for calls to defaulted constructors.
83 Foo() = default; // non-throwing
87 Bar(Bar
&&) // expected-error {{move constructor can be noexcept [loplugin:noexceptmove]}}
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */