compilerplugins/clang/stringliteraldefine.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 2361b6215bb4d8002cc7bfb157e125ebea26b7a2 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Feb 15 15:48:47 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Feb 15 18:21:28 2022 +0100 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 <sberg...@redhat.com> 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)