summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/compat.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-10 14:27:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-10 15:42:45 +0200
commit3732bba5e2b5ca5890be1fc3d09455248b81c763 (patch)
tree952b19bc66fed70f123392863499277d8c38b28b /compilerplugins/clang/compat.hxx
parenta774d3295f84c5c4df26274edec2778ea3c3dc59 (diff)
Adapt compilerplugins to Clang VK_RValue -> VK_PRValue rename
<https://github.com/llvm/llvm-project/commit/aef5d8fdc7d0d348125d5ecf4a13be5888eb1654> "[clang] NFC: Rename rvalue to prvalue" Change-Id: I237e8a491465500e35637f8dae400402bcd9411d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116983 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r--compilerplugins/clang/compat.hxx7
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;