path: root/compilerplugins/clang/test
diff options
authorStephan Bergmann <>2019-11-12 21:53:31 +0100
committerStephan Bergmann <>2019-11-13 15:06:42 +0100
commit913d34ec6b8fdb2796f76ce90fee51ade2051189 (patch)
tree261aefa505e7d71ad38c9d5b2ae0cfe92e9738c8 /compilerplugins/clang/test
parenteea0879cdf1b40e6ce424dd97b58e2a84846ad79 (diff)
Extend loplugin:salbool to loplugin:fakebool
...checking for unnecessary uses of more "fake bool" types. In the past, some of the checks involving the types of variables or data members, or the return types of functions, issued warnings that required surrounding code to be changed too (e.g., when changing the signature of a function whose address was taken). These checks have been tightened now to not warn in such cases (which avoids warnings that require changes to additional code, or changes that might even be impossible to make, at the cost of being less aggressive about removing all unnecessary uses of those "fake bool" types). Change-Id: I70eb75039817cda34ed611387ee27dc5f36a3e2e Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r--compilerplugins/clang/test/fakebool.cxx (renamed from compilerplugins/clang/test/salbool.cxx)6
1 files changed, 5 insertions, 1 deletions
diff --git a/compilerplugins/clang/test/salbool.cxx b/compilerplugins/clang/test/fakebool.cxx
index da861afe73be..26b5d7e2f791 100644
--- a/compilerplugins/clang/test/salbool.cxx
+++ b/compilerplugins/clang/test/fakebool.cxx
@@ -11,8 +11,12 @@
#include <sal/types.h>
+namespace {
struct S {
- sal_Bool b; // expected-error {{FieldDecl, use "bool" instead of "sal_Bool" [loplugin:salbool]}}
+ sal_Bool b; // expected-error {{FieldDecl, use "bool" instead of 'sal_Bool' (aka 'unsigned char') [loplugin:fakebool]}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */