summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-15 15:48:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-15 18:21:28 +0100
commit2361b6215bb4d8002cc7bfb157e125ebea26b7a2 (patch)
tree3060459c8df86c3c6dc7dbc52257d3b70594ad2b /compilerplugins
parent74a638011da4c2e8475d6f9d4d3a0ffbc4e10807 (diff)
Fix a CLANG_VERSION check
These functions became available with <https://github.com/llvm/llvm-project/commit/a32a2e34431480759d4983949cbcc25456c6199b> "[clang] Move two utility functions into SourceManager" towards Clang 8 and <https://github.com/llvm/llvm-project/commit/5ef88bdb68234b21b2ecda683dfe2f76513502d9> "Fix isInSystemMacro to handle pasted macros" towards Clang 9 Change-Id: I95b20bc88ff416b49502bdea23e223e6fa966eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/stringliteraldefine.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/compilerplugins/clang/stringliteraldefine.cxx b/compilerplugins/clang/stringliteraldefine.cxx
index 0eda65e7bea2..3eef01533ef3 100644
--- a/compilerplugins/clang/stringliteraldefine.cxx
+++ b/compilerplugins/clang/stringliteraldefine.cxx
@@ -62,8 +62,7 @@ public:
// check if it is the right kind of macro (not particularly reliable checks)
if (!macroLoc.isValid() || !compiler.getSourceManager().isInMainFile(macroLoc)
|| compiler.getSourceManager().isInSystemHeader(macroLoc)
-// not sure when these became available
-#if CLANG_VERSION >= 130000
+#if CLANG_VERSION >= 90000
|| compiler.getSourceManager().isWrittenInBuiltinFile(macroLoc)
|| compiler.getSourceManager().isWrittenInScratchSpace(macroLoc)
|| compiler.getSourceManager().isWrittenInCommandLineFile(macroLoc)