Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / compilerplugins / clang / test / unnecessaryoverride-dtor.hxx
blob9f722375a58bc8b9cf4b43029d6011ad73763248
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include <sal/config.h>
14 #include <rtl/ref.hxx>
16 struct VirtualBase {
17 virtual ~VirtualBase() {}
20 struct IncludedDerived1: VirtualBase {
21 ~IncludedDerived1() override {}; // expected-error {{unnecessary user-declared destructor [loplugin:unnecessaryoverride]}}
24 struct IncludedDerived2: VirtualBase {
25 ~IncludedDerived2() override;
28 struct IncludedNotDerived {
29 ~IncludedNotDerived();
32 struct Incomplete;
33 struct IncludedDerived3: VirtualBase {
34 IncludedDerived3();
35 ~IncludedDerived3() override;
37 private:
38 IncludedDerived3(IncludedDerived3 &) = delete;
39 void operator =(IncludedDerived3) = delete;
41 rtl::Reference<Incomplete> m;
44 struct MarkedInlineButNotDefined {
45 inline ~MarkedInlineButNotDefined();
48 template<typename T> struct TemplateBase: T {
49 virtual ~TemplateBase() {}
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */