[Libreoffice-commits] core.git: compilerplugins/clang

Noel Grandin noel.grandin at collabora.co.uk
Mon Oct 31 09:54:44 UTC 2016


 compilerplugins/clang/unnecessaryoverride.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit eaf32cd43c4d45db6c3b284d53169c81f522744e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Oct 31 11:53:02 2016 +0200

    fix unnecessaryoverride clang plugin on clang < 3.8
    
    Change-Id: Id78d694cf7271a6abf94234958ab623cf1cd93a5

diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 7136cc6..fedea34 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];


More information about the Libreoffice-commits mailing list