diff options
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 97410fcbdc7a..bdbcdcb46f0b 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -240,6 +240,22 @@ inline const clang::Expr *getSubExprAsWritten(const 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 |