[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 5 08:26:10 UTC 2020
compilerplugins/clang/test/consttobool.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 8324dfb50b1762a8a5b941da9d62bf6bab683364
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 4 22:22:02 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 5 10:25:26 2020 +0200
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 at redhat.com>
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 at +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 at +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: */
More information about the Libreoffice-commits
mailing list