summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-19 12:26:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-19 17:05:09 +0200
commit809ddff82dc9a28051d8f6b0d6513b1824ba0ab9 (patch)
tree84fc67e076a58211584c7cf7c3e7e7c13756ba17 /codemaker
parentc4df27dc893fc397725334f885cb6bdb2585924a (diff)
Fix the Clang check for using <experimental/source_location>
(see the <https://gerrit.libreoffice.org/c/core/+/93868/19# message-77dcd3b30c4ae3919354f84b46b27d934164a938> comment to "use std::experimental::source_location in uno::Exception") Change-Id: I5d682dcf97be59f1798c5c08ad13025dfee0dd4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94495 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index e2288c961133..75906b9c5f00 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2787,8 +2787,9 @@ void ExceptionType::dumpHdlFile(
{
// LIBO_INTERNAL_ONLY implies GCC >= 7, which we need for this
// Merely checking __has_include is not enough because some systems have the header,
- // but do not have a new enough clang for it to work.
- includes.addCustom("#if defined LIBO_INTERNAL_ONLY && ((defined __GNUC__ && !defined __clang__) || (defined __clang__ && __clang_major__ >= 8)) && __has_include(<experimental/source_location>)");
+ // but do not have a new enough Clang 9 supporting __builtin_FILE/LINE/FUNCTION as used by
+ // that libstdc++ header.
+ includes.addCustom("#if defined LIBO_INTERNAL_ONLY && ((defined __GNUC__ && !defined __clang__) || (defined __clang__ && __clang_major__ >= 9)) && __has_include(<experimental/source_location>)");
includes.addCustom("#define LIBO_USE_SOURCE_LOCATION");
includes.addCustom("#endif");
includes.addCustom("#if defined LIBO_USE_SOURCE_LOCATION");