Bump --enable-compiler-plugins to Clang 3.8.0

<https://lists.freedesktop.org/archives/libreoffice/2017-December/079107.html>
"Clang baseline bump"

Change-Id: I18fca8794ea34118fc6308458064d0c28cf5caf7
Reviewed-on: https://gerrit.libreoffice.org/46557
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2017-12-15 14:20:38 +01:00
parent 00bc5a0973
commit 9663341f92
32 changed files with 93 additions and 399 deletions

View File

@@ -14,7 +14,6 @@
#include <set>
#include <clang/AST/CXXInheritance.h>
#include "compat.hxx"
#include "plugin.hxx"
/**
@@ -102,12 +101,7 @@ public:
private:
const CXXMethodDecl * findOverriddenOrSimilarMethodInSuperclasses(const CXXMethodDecl *);
bool BaseCheckCallback(
const CXXRecordDecl *BaseDefinition
#if CLANG_VERSION < 30800
, void *
#endif
);
bool BaseCheckCallback(const CXXRecordDecl *BaseDefinition);
};
bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
@@ -277,8 +271,8 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
}
}
if (compat::getReturnType(*methodDecl).getCanonicalType()
!= compat::getReturnType(*overriddenMethodDecl).getCanonicalType())
if (methodDecl->getReturnType().getCanonicalType()
!= overriddenMethodDecl->getReturnType().getCanonicalType())
{
return true;
}
@@ -290,7 +284,7 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
return true;
const CXXMemberCallExpr* callExpr = nullptr;
if (compat::getReturnType(*methodDecl).getCanonicalType()->isVoidType())
if (methodDecl->getReturnType().getCanonicalType()->isVoidType())
{
if (auto const e = dyn_cast<Expr>(*compoundStmt->body_begin())) {
callExpr = dyn_cast<CXXMemberCallExpr>(e->IgnoreImplicit()->IgnoreParens());
@@ -395,9 +389,6 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
return nullptr;
}
#if CLANG_VERSION < 30800
return nullptr;
#else
std::vector<const CXXMethodDecl*> maSimilarMethods;
auto BaseMatchesCallback = [&](const CXXBaseSpecifier *cxxBaseSpecifier, CXXBasePath& )
@@ -425,8 +416,8 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
{
continue;
}
if (compat::getReturnType(*methodDecl).getCanonicalType()
!= compat::getReturnType(*baseMethod).getCanonicalType())
if (methodDecl->getReturnType().getCanonicalType()
!= baseMethod->getReturnType().getCanonicalType())
{
continue;
}
@@ -454,7 +445,6 @@ const CXXMethodDecl* UnnecessaryOverride::findOverriddenOrSimilarMethodInSupercl
return maSimilarMethods[0];
}
return nullptr;
#endif
}