[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 3 22:46:20 UTC 2020
compilerplugins/clang/unnecessaryoverride.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 9aa2b6b7a91c17658e7fc14e11809f746dcd440f
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Feb 3 17:01:05 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Feb 3 23:45:46 2020 +0100
Silence loplugin:unnecessaryoverride in WinSalInstance::GetBackendCapabilities
...(vcl/win/app/salinst.cxx) in case the
#if HAVE_FEATURE_SKIA
#if SKIA_USE_BITMAP32
...
block it contains is excluded (when building with clang-cl on Windows)
Change-Id: I60910106bbd6a4c2cb3f393945a5417eb02407c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87898
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 1ad521a17571..10ab158b7d8d 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -380,6 +380,10 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
return true;
}
+ if (containsPreprocessingConditionalInclusion(methodDecl->getBody()->getSourceRange())) {
+ return true;
+ }
+
report(
DiagnosticsEngine::Warning, "%0%1 function just calls %2 parent",
methodDecl->getLocation())
More information about the Libreoffice-commits
mailing list