summaryrefslogtreecommitdiffstats
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 12:58:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 12:58:17 +0200
commit5e997f4dba1cfcde554ff413a615e101b9c72ee5 (patch)
tree89f521425fd7584f9b3b3b4806ae59f0b584db23 /compilerplugins
parentDecrease SpreadsheetML import time to prevent "General input/output error" (diff)
downloadcore-5e997f4dba1cfcde554ff413a615e101b9c72ee5.tar.gz
core-5e997f4dba1cfcde554ff413a615e101b9c72ee5.zip
disable this chunk of loplugin code on clang < 3.8
not worth the spaghetti of making it work across version Change-Id: I0de923b16fb6d58cbad55adc9878ab39bc0c86ae
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unnecessaryoverride.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 96da48c339bd..953abcb65fd9 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -222,13 +222,12 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
return nullptr;
}
+#if CLANG_VERSION < 30800
+ return nullptr;
+#else
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;
@@ -269,16 +268,13 @@ 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];
}
return nullptr;
+#endif
}