summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unnecessaryoverride.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/unnecessaryoverride.cxx')
-rw-r--r--compilerplugins/clang/unnecessaryoverride.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 7136cc632739..fedea345ca93 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -225,7 +225,11 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
std::vector<const CXXMethodDecl*> maSimilarMethods;
+#if CLANG_VERSION >= 30800
auto BaseMatchesCallback = [&](const CXXBaseSpecifier *cxxBaseSpecifier, CXXBasePath& )
+#else
+ auto BaseMatchesCallback = [&](const CXXBaseSpecifier *cxxBaseSpecifier, CXXBasePath&, void* )
+#endif
{
if (cxxBaseSpecifier->getAccessSpecifier() != AS_public && cxxBaseSpecifier->getAccessSpecifier() != AS_protected)
return false;
@@ -266,7 +270,11 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
};
CXXBasePaths aPaths;
+#if CLANG_VERSION >= 30800
methodDecl->getParent()->lookupInBases(BaseMatchesCallback, aPaths);
+#else
+ methodDecl->getParent()->lookupInBases(BaseMatchesCallback, nullptr, aPaths);
+#endif
if (maSimilarMethods.size() == 1) {
return maSimilarMethods[0];