summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/compat.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-07-01 14:56:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-07-01 22:12:41 +0200
commit9e2dbeea9f680f2d3d1611167820c197ce8a9685 (patch)
tree548015c48ef6276571c0ff3af58cef5dd0221159 /compilerplugins/clang/compat.hxx
parent7a89eae97a970939174d59aa58147eaa194acaee (diff)
Adapt to LLVM 15 trunk clang::StringLiteral::isAscii rename
<https://github.com/llvm/llvm-project/commit/a9a60f20e6cc80855864b8f559073bc31f34554b> "[Clang] Rename StringLiteral::isAscii() => isOrdinary() [NFC]" Change-Id: Iac293c19bd135a94dcc3a3ef9f252ca6175c959a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136744 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r--compilerplugins/clang/compat.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index 350263da6854..1a6266ec5201 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -125,6 +125,14 @@ inline const clang::Expr *getSubExprAsWritten(const clang::CastExpr *This) {
return getSubExprAsWritten(const_cast<clang::CastExpr *>(This));
}
+inline bool isOrdinary(clang::StringLiteral const * expr) {
+#if CLANG_VERSION >= 150000
+ return expr->isOrdinary();
+#else
+ return expr->isAscii();
+#endif
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */