diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-04 22:22:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-05 10:25:26 +0200 |
commit | 8324dfb50b1762a8a5b941da9d62bf6bab683364 (patch) | |
tree | bf420d229dfe829b3fe5de0d09c8db2efdfd5d5d /compilerplugins/clang | |
parent | 72f01ff8da8ffaad50eebc49182e49dee2aa5877 (diff) |
Adapt to --disable-assert-always-abort
Change-Id: Ib578c5d8c82ca763770d316384c6753534dbfee3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100141
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/test/consttobool.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/consttobool.cxx b/compilerplugins/clang/test/consttobool.cxx index 28184825556e..3d880cb4d5d1 100644 --- a/compilerplugins/clang/test/consttobool.cxx +++ b/compilerplugins/clang/test/consttobool.cxx @@ -55,6 +55,7 @@ int main() // expected-error@+1 {{implicit conversion of constant 3 of type 'int' to 'bool'; use 'true' instead [loplugin:consttobool]}} b = (c1 | c2); +#if !defined NDEBUG assert(b); // no warnings from within assert macro itself assert(b && "msg"); // no warnings for `&& "msg"` if (b) @@ -63,6 +64,7 @@ int main() } // expected-error@+1 {{implicit conversion of constant &"msg"[0] of type 'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]}} assert("msg"); +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |