From 90d22daf99e3d07ba19b7d16f240ab53b0873d49 Mon Sep 17 00:00:00 2001 From: Kevin Suo Date: Thu, 15 Feb 2024 23:16:50 +0800 Subject: [PATCH] tdf#142467: restore "final" in CandleStickChartType class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "final" was removed in commit e06f2bb00137655dbf6f0a8c8c2fc555720f4d3f (tdf#142467 crash on calling 'getInfoHelper' in final class, 2021-05-26) and commit 6cb1745c24c7651050e30216860c539fa13cc0e2 (tdf#142467: Update comments with GCC bug ID, 2021-05-31) due to a bug in gcc . Now it has been amost 3 years past and that gcc bug has long been fixed, so it is time to restore the "final". Change-Id: I7db9fe59209cfbae4c04bb3a91cd764db9a38d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163447 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- chart2/source/model/template/CandleStickChartType.hxx | 4 +--- compilerplugins/clang/fragiledestructor.cxx | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/chart2/source/model/template/CandleStickChartType.hxx b/chart2/source/model/template/CandleStickChartType.hxx index e7610750758f..822422aac85f 100644 --- a/chart2/source/model/template/CandleStickChartType.hxx +++ b/chart2/source/model/template/CandleStickChartType.hxx @@ -23,9 +23,7 @@ namespace chart { -// see "[10/11/12 Regression] using -// declaration causing virtual call with wrongly adjusted this pointer" before restoring 'final' -class CandleStickChartType /* final */ : public ChartType +class CandleStickChartType final : public ChartType { public: explicit CandleStickChartType(); diff --git a/compilerplugins/clang/fragiledestructor.cxx b/compilerplugins/clang/fragiledestructor.cxx index f8ec76a561f8..777710056684 100644 --- a/compilerplugins/clang/fragiledestructor.cxx +++ b/compilerplugins/clang/fragiledestructor.cxx @@ -51,8 +51,6 @@ public: return false; if (loplugin::isSamePathname(fn, SRCDIR "/sw/source/core/layout/ssfrm.cxx")) // ~SwFrame calling IsDeleteForbidden return false; - if (loplugin::isSamePathname(fn, SRCDIR "/chart2/source/model/template/CandleStickChartType.cxx")) // to ignore "[10/11/12 Regression] using declaration causing virtual call with wrongly adjusted this pointer" workaround - return false; return true; }