New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...warning about non-overriding virtual dtors in final classes. Every single one of these might or might not be suspicious (e.g., in some cases it might be better to have a virtual dtor in a derived-from class). Also, for some of the virtual dtors, making them non-virtual then caused > error: unnecessary user-declared destructor [loplugin:unnecessaryoverride] so those were removed completely. Change-Id: If0ee71645a347d6096b65988c56f627c42fe54b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185223 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
, const rtl::Reference<::chart::ChartModel>& xChartModel );
|
||||
|
||||
explicit SelectionHelper( SdrObject* pSelectedObj );
|
||||
virtual ~SelectionHelper();
|
||||
~SelectionHelper();
|
||||
|
||||
//MarkHandleProvider:
|
||||
virtual bool getMarkHandles( SdrHdlList& rHdlList ) override;
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
ErrorBarResources(
|
||||
weld::Builder* pParent, weld::DialogController* pControllerDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y);
|
||||
virtual ~ErrorBarResources();
|
||||
~ErrorBarResources();
|
||||
|
||||
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
|
||||
void SetErrorBarType( tErrorBarType eNewType );
|
||||
|
||||
@@ -58,7 +58,7 @@ class MergedMinimumAndMaximumSupplier final : public MinimumAndMaximumSupplier
|
||||
{
|
||||
public:
|
||||
MergedMinimumAndMaximumSupplier();
|
||||
virtual ~MergedMinimumAndMaximumSupplier();
|
||||
~MergedMinimumAndMaximumSupplier();
|
||||
|
||||
void addMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier );
|
||||
bool hasMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier );
|
||||
|
||||
@@ -328,7 +328,7 @@ class OWeakRefListener final : public XReference
|
||||
public:
|
||||
explicit OWeakRefListener(const Reference< XInterface >& xInt);
|
||||
explicit OWeakRefListener(const Reference< XWeak >& xInt);
|
||||
virtual ~OWeakRefListener();
|
||||
~OWeakRefListener();
|
||||
|
||||
// noncopyable
|
||||
OWeakRefListener(const OWeakRefListener&) = delete;
|
||||
|
||||
@@ -329,8 +329,6 @@ private:
|
||||
class ConcreteInfoService final : public ::comphelper::IPropertyInfoService
|
||||
{
|
||||
public:
|
||||
virtual ~ConcreteInfoService() {}
|
||||
|
||||
virtual sal_Int32 getPreferredPropertyId(const OUString& _rName) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace comphelper
|
||||
bool m_bAllowEmptyPropertyName;
|
||||
public:
|
||||
PropertyBag();
|
||||
virtual ~PropertyBag();
|
||||
~PropertyBag();
|
||||
|
||||
/** allow adding property with empty string as name
|
||||
(by default, such names are rejected with IllegalActionException).
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace connectivity
|
||||
public:
|
||||
OParseContext();
|
||||
|
||||
virtual ~OParseContext();
|
||||
~OParseContext();
|
||||
// retrieves language specific error messages
|
||||
virtual OUString getErrorMessage(ErrorCode _eCodes) const override;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace dbaui
|
||||
{
|
||||
public:
|
||||
DBACCESS_DLLPUBLIC UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex );
|
||||
virtual ~UndoManager();
|
||||
~UndoManager();
|
||||
|
||||
DBACCESS_DLLPUBLIC SfxUndoManager& GetSfxUndoManager() const;
|
||||
|
||||
|
||||
@@ -280,7 +280,6 @@ public:
|
||||
|
||||
OOX_DLLPUBLIC ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, css::uno::Reference< css::frame::XModel > const & xModel,
|
||||
::oox::core::XmlFilterBase* pFB, DocumentType eDocumentType );
|
||||
virtual ~ChartExport() {}
|
||||
|
||||
OOX_DLLPUBLIC void SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer);
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
std::unique_ptr< SfxFrame_Impl > m_pImpl;
|
||||
VclPtr<vcl::Window> m_pWindow;
|
||||
|
||||
virtual ~SfxFrame();
|
||||
~SfxFrame();
|
||||
|
||||
SAL_DLLPRIVATE SfxFrame( vcl::Window& i_rContainerWindow );
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace svt
|
||||
nothing happens.
|
||||
*/
|
||||
JavaContext( const css::uno::Reference< css::uno::XCurrentContext> & ctx );
|
||||
virtual ~JavaContext();
|
||||
~JavaContext();
|
||||
|
||||
// XInterface
|
||||
virtual css::uno::Any SAL_CALL queryInterface(
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
oslInterlockedCount m_aRefCount;
|
||||
JavaInteractionHandler(JavaInteractionHandler const&) = delete;
|
||||
JavaInteractionHandler& operator = (JavaInteractionHandler const &) = delete;
|
||||
SVT_DLLPRIVATE virtual ~JavaInteractionHandler();
|
||||
SVT_DLLPRIVATE ~JavaInteractionHandler();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace sdr
|
||||
|
||||
public:
|
||||
MasterPageDescriptor(SdrPage& aOwnerPage, SdrPage& aUsedPage);
|
||||
virtual ~MasterPageDescriptor();
|
||||
~MasterPageDescriptor();
|
||||
|
||||
// ViewContact part
|
||||
sdr::contact::ViewContact& GetViewContact() const;
|
||||
|
||||
@@ -55,7 +55,7 @@ class SVXCORE_DLLPUBLIC SdrMark final : public sdr::ObjectUser
|
||||
public:
|
||||
explicit SdrMark(SdrObject* pNewObj = nullptr, SdrPageView* pNewPageView = nullptr);
|
||||
SAL_DLLPRIVATE SdrMark(const SdrMark& rMark);
|
||||
virtual ~SdrMark();
|
||||
~SdrMark();
|
||||
|
||||
// Derived from ObjectUser
|
||||
SAL_DLLPRIVATE virtual void ObjectInDestruction(const SdrObject& rObject) override;
|
||||
|
||||
@@ -540,7 +540,7 @@ class VCL_DLLPUBLIC PDFDocument final : public PDFObjectContainer
|
||||
|
||||
public:
|
||||
PDFDocument();
|
||||
virtual ~PDFDocument();
|
||||
~PDFDocument();
|
||||
PDFDocument& operator=(const PDFDocument&) = delete;
|
||||
PDFDocument(const PDFDocument&) = delete;
|
||||
/// @name Low-level functions, to be used by PDFElement subclasses.
|
||||
|
||||
+2
-3
@@ -42,7 +42,7 @@ class ScFuncDesc final : public formula::IFunctionDescription
|
||||
{
|
||||
public:
|
||||
ScFuncDesc();
|
||||
virtual ~ScFuncDesc();
|
||||
~ScFuncDesc();
|
||||
|
||||
/**
|
||||
Clears the object
|
||||
@@ -273,7 +273,6 @@ class ScFunctionCategory final : public formula::IFunctionCategory
|
||||
public:
|
||||
ScFunctionCategory(const ::std::vector<const ScFuncDesc*>& _rCategory,sal_uInt32 _nCategory)
|
||||
: m_rCategory(_rCategory),m_nCategory(_nCategory){}
|
||||
virtual ~ScFunctionCategory(){}
|
||||
|
||||
/**
|
||||
@return count of functions in this category
|
||||
@@ -315,7 +314,7 @@ public:
|
||||
The function lists of the categories are sorted by (case insensitive) function name
|
||||
*/
|
||||
ScFunctionMgr();
|
||||
virtual ~ScFunctionMgr();
|
||||
~ScFunctionMgr();
|
||||
|
||||
/**
|
||||
Returns name of category.
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace sd
|
||||
{
|
||||
public:
|
||||
ShapeList();
|
||||
virtual ~ShapeList();
|
||||
~ShapeList();
|
||||
|
||||
/** adds the given shape to this list */
|
||||
void addShape( SdrObject& rObject );
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
/** The destructor deletes any remaining entries of the local list of
|
||||
templates.
|
||||
*/
|
||||
virtual ~TemplateScanner();
|
||||
~TemplateScanner();
|
||||
|
||||
/** Implementation of the AsynchronousTask interface method.
|
||||
*/
|
||||
|
||||
@@ -137,7 +137,7 @@ struct SfxObjectShell_Impl final : public ::sfx2::IMacroDocumentAccess
|
||||
mutable bool m_bCloseModelScheduled = false;
|
||||
|
||||
SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
|
||||
virtual ~SfxObjectShell_Impl();
|
||||
~SfxObjectShell_Impl();
|
||||
|
||||
// IMacroDocumentAccess overridables
|
||||
virtual sal_Int16 getCurrentMacroExecMode() const override;
|
||||
|
||||
@@ -186,7 +186,6 @@ public:
|
||||
|
||||
maPos.pSelectedNode->Accept( this );
|
||||
}
|
||||
virtual ~SmCaretPos2LineVisitor() {}
|
||||
void Visit( SmTextNode* pNode ) override;
|
||||
using SmDefaultingVisitor::Visit;
|
||||
const SmCaretLine& GetResult( ) const {
|
||||
@@ -223,7 +222,6 @@ public:
|
||||
mrDev.ReMirror(maPosition);
|
||||
pTree->Accept( this );
|
||||
}
|
||||
virtual ~SmDrawingVisitor() {}
|
||||
void Visit( SmTableNode* pNode ) override;
|
||||
void Visit( SmBraceNode* pNode ) override;
|
||||
void Visit( SmBracebodyNode* pNode ) override;
|
||||
@@ -281,7 +279,6 @@ class SmSetSelectionVisitor final : public SmDefaultingVisitor
|
||||
{
|
||||
public:
|
||||
SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos endPos, SmNode* pNode);
|
||||
virtual ~SmSetSelectionVisitor() {}
|
||||
void Visit( SmBinHorNode* pNode ) override;
|
||||
void Visit( SmUnHorNode* pNode ) override;
|
||||
void Visit( SmFontNode* pNode ) override;
|
||||
@@ -341,7 +338,7 @@ class SmCaretPosGraphBuildingVisitor final : public SmVisitor
|
||||
public:
|
||||
/** Builds a caret position graph for pRootNode */
|
||||
explicit SmCaretPosGraphBuildingVisitor( SmNode* pRootNode );
|
||||
virtual ~SmCaretPosGraphBuildingVisitor();
|
||||
~SmCaretPosGraphBuildingVisitor();
|
||||
void Visit( SmTableNode* pNode ) override;
|
||||
void Visit( SmBraceNode* pNode ) override;
|
||||
void Visit( SmBracebodyNode* pNode ) override;
|
||||
@@ -390,7 +387,6 @@ public:
|
||||
SmCloningVisitor()
|
||||
: mpResult(nullptr)
|
||||
{}
|
||||
virtual ~SmCloningVisitor() {}
|
||||
void Visit( SmTableNode* pNode ) override;
|
||||
void Visit( SmBraceNode* pNode ) override;
|
||||
void Visit( SmBracebodyNode* pNode ) override;
|
||||
@@ -470,7 +466,6 @@ class SmNodeToTextVisitor final : public SmVisitor
|
||||
{
|
||||
public:
|
||||
SmNodeToTextVisitor( SmNode* pNode, OUString &rText );
|
||||
virtual ~SmNodeToTextVisitor() {}
|
||||
|
||||
void Visit( SmTableNode* pNode ) override;
|
||||
void Visit( SmBraceNode* pNode ) override;
|
||||
|
||||
@@ -34,7 +34,7 @@ class CellTextProvider final : public svx::ITextProvider
|
||||
{
|
||||
public:
|
||||
explicit CellTextProvider(sdr::table::CellRef xCell);
|
||||
virtual ~CellTextProvider();
|
||||
~CellTextProvider();
|
||||
|
||||
private:
|
||||
virtual sal_Int32 getTextCount() const override;
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace svx
|
||||
|
||||
public:
|
||||
FmTextControlShell( SfxViewFrame* _pFrame );
|
||||
virtual ~FmTextControlShell();
|
||||
~FmTextControlShell();
|
||||
|
||||
// clean up any resources associated with this instance
|
||||
void dispose();
|
||||
|
||||
@@ -160,7 +160,7 @@ class SwPrintUIOptions final : public vcl::PrinterOptionsHelper
|
||||
|
||||
public:
|
||||
SwPrintUIOptions( sal_uInt16 nCurrentPage, bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData );
|
||||
virtual ~SwPrintUIOptions();
|
||||
~SwPrintUIOptions();
|
||||
|
||||
bool processPropertiesAndCheckFormat( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
void WindowDestroyed( vcl::Window* pWindow ) override;
|
||||
|
||||
private:
|
||||
virtual ~UnoWrapper();
|
||||
~UnoWrapper();
|
||||
};
|
||||
|
||||
#endif // INCLUDED_TOOLKIT_INC_HELPER_UNOWRAPPER_HXX
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace vcl
|
||||
: m_rTargetDevice( _rTargetDevice )
|
||||
{
|
||||
}
|
||||
virtual ~DefaultTextLayout();
|
||||
~DefaultTextLayout();
|
||||
|
||||
// TextLayoutCommon overridables
|
||||
SAL_DLLPRIVATE virtual tools::Long GetTextWidth( const OUString& _rText,
|
||||
|
||||
Reference in New Issue
Block a user