From 5baeba69bf448a60068d3bbbcf88dbdf491e41ea Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 26 Oct 2022 08:54:49 +0200 Subject: Adapt compilerplugins to recent Clang 16 trunk change "NFC: [clang] Template argument cleanups." Change-Id: I84bc276c21efcc11643ae7003e0fee6c7592130f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141860 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- compilerplugins/clang/compat.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'compilerplugins/clang/compat.hxx') diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index b5941c52fced..60888c15b1c9 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -162,6 +162,19 @@ inline clang::TemplateTypeParmDecl const * getReplacedParameter( #endif } +// Printing `std::size_t n` via `report(...) << n` is ambiguous prior to +// "[clang] +// Allow printing 64 bit ints in diagnostics" (in Clang 14.x) and its follow-up +// "Resolve +// overload ambiguity on Mac OS when printing size_t in diagnostics" (in Clang 15.x): +inline +#if CLANG_VERSION >= 150000 +std::size_t +#else +unsigned +#endif +diagnosticSize(std::size_t n) { return n; } + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit