diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-26 08:54:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-26 15:06:18 +0200 |
commit | 5baeba69bf448a60068d3bbbcf88dbdf491e41ea (patch) | |
tree | 3c09bf7964a1d07a76d8563ef2ba54cc97617688 /compilerplugins/clang/compat.hxx | |
parent | 932423b8f3ac5e15809c3234d589c0098a00a52c (diff) |
Adapt compilerplugins to recent Clang 16 trunk change
<https://github.com/llvm/llvm-project/commit/1acffe81ee9117691812b9bf8747c03354177d15>
"NFC: [clang] Template argument cleanups."
Change-Id: I84bc276c21efcc11643ae7003e0fee6c7592130f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141860
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 +// <https://github.com/llvm/llvm-project/commit/afdac5fbcb6a375245d435e4427086a376de59ff> "[clang] +// Allow printing 64 bit ints in diagnostics" (in Clang 14.x) and its follow-up +// <https://github.com/llvm/llvm-project/commit/ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720> "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: */ |