compilerplugins/clang/finalclasses.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 6e1376dd60442275f34a58cf7b7c8e54b0902f78 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Oct 29 08:08:38 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 29 09:01:02 2019 +0100 loplugin:finalclasses fix check need to check after we generate the inherited-from set, not before Change-Id: Ic66deeb680f4a2505d66f99872ac7a5bc263cda9 Reviewed-on: https://gerrit.libreoffice.org/81636 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/finalclasses.cxx b/compilerplugins/clang/finalclasses.cxx index e7704ca8fc0c..10948790697f 100644 --- a/compilerplugins/clang/finalclasses.cxx +++ b/compilerplugins/clang/finalclasses.cxx @@ -93,8 +93,6 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl) decl = decl->getCanonicalDecl(); if (!decl->hasDefinition()) return true; - if (decl->hasAttr<FinalAttr>()) - return true; for (auto it = decl->bases_begin(); it != decl->bases_end(); ++it) { @@ -107,6 +105,8 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl) checkBase(spec.getType()); } + if (decl->hasAttr<FinalAttr>()) + return true; bool bFoundVirtual = false; bool bFoundProtected = false; for (auto it = decl->method_begin(); it != decl->method_end(); ++it) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits