[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 18 16:33:36 UTC 2020
compilerplugins/clang/test/writeonlyvars.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit fd60c5a4879cb881b6c5abfe53ba80126ebb7303
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon May 18 14:52:16 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon May 18 18:32:53 2020 +0200
Adapt compilerplugins/clang/test/writeonlyvars.cxx
...to 1d0bc2139759f087d50432f8a2116060676f34e1
"use std::experimental::source_location in uno::Exception"
Change-Id: I2b18dbae89c6f219edacba5d147ea265ca83725e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94422
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/test/writeonlyvars.cxx b/compilerplugins/clang/test/writeonlyvars.cxx
index 740befb6f172..c2f78bddda88 100644
--- a/compilerplugins/clang/test/writeonlyvars.cxx
+++ b/compilerplugins/clang/test/writeonlyvars.cxx
@@ -16,6 +16,19 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+// See 1d0bc2139759f087d50432f8a2116060676f34e1 "use std::experimental::source_location in
+// uno::Exception" modification to
+// workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hdl, which is indirectly
+// included through the above #include directives, in turn causing conditional inclusion of
+// include/o3tl/runtimetooustring.hxx (and where `ok` is only read in an assert in !NDEBUG builds):
+#if defined LIBO_USE_SOURCE_LOCATION
+// expected-error at o3tl/runtimetooustring.hxx:* {{read s [loplugin:writeonlyvars]}}
+// expected-error at o3tl/runtimetooustring.hxx:* {{write s [loplugin:writeonlyvars]}}
+#if !defined NDEBUG
+// expected-error at o3tl/runtimetooustring.hxx:* {{read ok [loplugin:writeonlyvars]}}
+#endif
+#endif
+
namespace Bar
{
void test()
More information about the Libreoffice-commits
mailing list