Kaydet (Commit) 56f87dac authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Adapt compilerplugins to Clang 9 isExplicitSpecified -> getExplicitSpecifier

see <https://github.com/llvm/llvm-project/commit/
76b9027f352a83c13c98820724071c5e3bea6232> "[c++20] Add support for
explicit(bool), as described in P0892R2."

Change-Id: Ia8a6902a64ab3377328fd5e3ed57246d214176f2
Reviewed-on: https://gerrit.libreoffice.org/72335
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 963b9aaa
...@@ -240,6 +240,22 @@ inline const clang::Expr *getSubExprAsWritten(const clang::CastExpr *This) { ...@@ -240,6 +240,22 @@ inline const clang::Expr *getSubExprAsWritten(const clang::CastExpr *This) {
return getSubExprAsWritten(const_cast<clang::CastExpr *>(This)); return getSubExprAsWritten(const_cast<clang::CastExpr *>(This));
} }
inline bool isExplicitSpecified(clang::CXXConstructorDecl const * decl) {
#if CLANG_VERSION >= 80000
return decl->getExplicitSpecifier().isExplicit();
#else
return decl->isExplicitSpecified();
#endif
}
inline bool isExplicitSpecified(clang::CXXConversionDecl const * decl) {
#if CLANG_VERSION >= 80000
return decl->getExplicitSpecifier().isExplicit();
#else
return decl->isExplicitSpecified();
#endif
}
} }
#endif #endif
......
...@@ -536,9 +536,9 @@ bool SalCall::isSalCallFunction(FunctionDecl const* functionDecl, SourceLocation ...@@ -536,9 +536,9 @@ bool SalCall::isSalCallFunction(FunctionDecl const* functionDecl, SourceLocation
if (noReturnType if (noReturnType
&& !(functionDecl->isVirtualAsWritten() && !(functionDecl->isVirtualAsWritten()
|| (isa<CXXConstructorDecl>(functionDecl) || (isa<CXXConstructorDecl>(functionDecl)
&& cast<CXXConstructorDecl>(functionDecl)->isExplicitSpecified()) && compat::isExplicitSpecified(cast<CXXConstructorDecl>(functionDecl)))
|| (isa<CXXConversionDecl>(functionDecl) || (isa<CXXConversionDecl>(functionDecl)
&& cast<CXXConversionDecl>(functionDecl)->isExplicitSpecified()))) && compat::isExplicitSpecified(cast<CXXConversionDecl>(functionDecl)))))
{ {
SourceLocation endLoc1; SourceLocation endLoc1;
if (macroStartLoc.isMacroID() if (macroStartLoc.isMacroID()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment