diff options
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 897d9fe855c0..f62061ed48e4 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -17,6 +17,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/Basic/SourceManager.h" +#include "clang/Basic/Specifiers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/Lexer.h" #include "llvm/ADT/StringRef.h" @@ -169,6 +170,12 @@ inline bool CPlusPlus17(clang::LangOptions const & opts) { #endif } +#if CLANG_VERSION >= 130000 +constexpr clang::ExprValueKind VK_PRValue = clang::VK_PRValue; +#else +constexpr clang::ExprValueKind VK_PRValue = clang::VK_RValue; +#endif + inline bool EvaluateAsInt(clang::Expr const * expr, llvm::APSInt& intRes, const clang::ASTContext& ctx) { #if CLANG_VERSION >= 80000 clang::Expr::EvalResult res; |