diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 11:53:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 11:54:06 +0200 |
commit | eaf32cd43c4d45db6c3b284d53169c81f522744e (patch) | |
tree | 5c3b2604b294819a2e0e00c208ed8f4e2bd15d8e /compilerplugins | |
parent | b70f10e0811bb344db91332edc16410a66f4c36e (diff) |
fix unnecessaryoverride clang plugin on clang < 3.8
Change-Id: Id78d694cf7271a6abf94234958ab623cf1cd93a5
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/unnecessaryoverride.cxx | 8 |
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]; |