summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-28 21:14:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-28 22:54:38 +0100
commit8597748c42727b62e60f8a4af45520193d682de0 (patch)
tree507fea923e14a14091038822e0a46ccdbe8f2391
parent30c302cf489571ef13579c1ecd27c276945138d0 (diff)
Brown paper bag fix
...of 87369ad7b82da6904e889614c88617e610d4506b "Use std::unreachable if available". (Unfortunately, Clang didn't warn about the thus meaningless uses of O3TL_UNREACHABLE, presumably due to <https://github.com/llvm/llvm-project/commit/978cca9f49a1c0e3a01096017c9a34726866fbf3> "Suppress all -Wunused-value warnings from macro body expansions.") (While at it, and as the expansion of O3TL_UNREACHABLE is now a nice full expression, wrap it in parentheses, as is common best practice for such macro definitions.) Change-Id: I555e6716ebb66172add686521446d90db6054845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130729 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--include/o3tl/unreachable.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/o3tl/unreachable.hxx b/include/o3tl/unreachable.hxx
index d5a2e156b760..604f7a2f7728 100644
--- a/include/o3tl/unreachable.hxx
+++ b/include/o3tl/unreachable.hxx
@@ -21,7 +21,7 @@
#if defined __cpp_lib_unreachable
-#define O3TL_UNREACHABLE ::std::unreachable
+#define O3TL_UNREACHABLE (::std::unreachable())
#else