compilerplugins/clang/test/writeonlyvars.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit fd60c5a4879cb881b6c5abfe53ba80126ebb7303
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon May 18 14:52:16 2020 +0200
Commit:     Stephan Bergmann <sberg...@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 <sberg...@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@o3tl/runtimetooustring.hxx:* {{read s 
[loplugin:writeonlyvars]}}
+// expected-error@o3tl/runtimetooustring.hxx:* {{write s 
[loplugin:writeonlyvars]}}
+#if !defined NDEBUG
+// expected-error@o3tl/runtimetooustring.hxx:* {{read ok 
[loplugin:writeonlyvars]}}
+#endif
+#endif
+
 namespace Bar
 {
 void test()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to