diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-05-18 14:52:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-05-18 18:32:53 +0200 |
commit | fd60c5a4879cb881b6c5abfe53ba80126ebb7303 (patch) | |
tree | 6966de52d8c6351d4951d33aea221848c2f8323b | |
parent | a541cd91951eca15e40764244b34c72b347f9f26 (diff) |
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@redhat.com>
-rw-r--r-- | compilerplugins/clang/test/writeonlyvars.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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() |