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/.
20 inline S2() = default; // expected-error {{[loplugin:redundantinline]}}
21 inline ~S2() = default; // expected-error {{[loplugin:redundantinline]}}
30 static inline void f2();
32 inline void operator +();
34 inline operator int();
36 friend inline void f3();
43 void S3::f1() { (void)this; }
47 void S3::operator +() {}
51 S3::operator int() { return 0; }
54 inline S4() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
55 inline ~S4() { f1(); } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
57 inline void f1() { (void)this; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
59 static inline void f2() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
61 inline void operator +() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
63 inline operator int() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
65 friend inline void f4() {} // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
67 static constexpr int f5() { return 0; }
69 static constexpr inline int f6() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
72 constexpr int f5() { return 0; }
74 constexpr inline int f6() { return 0; } // expected-error {{function definition redundantly declared 'inline' [loplugin:redundantinline]}}
76 static inline int f7() { return 0; }
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */