summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-22 15:00:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-22 15:00:54 +0100
commit81286443129b11426787b83ae134edeb3121b8bf (patch)
tree222d0164f370ed066ee784845bb3fffca3a8faaf /compilerplugins
parentbbd9668d5f70d8ff00a7b10915e7a16ceadb8443 (diff)
implicitboolconversion: also warn about mixing bool/sal_Bool in &=, |=, ^=
...as MSVC would warn about those anyway. Change-Id: If22dfd35bc01aff1a1bef68702c616e711db42fb
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/implicitboolconversion.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx
index 0c45bf0372e0..65db49650135 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -399,7 +399,7 @@ bool ImplicitBoolConversion::TraverseBinAndAssign(CompoundAssignOperator * expr)
assert(!nested.empty());
for (auto i: nested.top()) {
if (i != expr->getRHS()->IgnoreParens()
- || !isBool(expr->getLHS()->IgnoreParens()))
+ || !isBool(expr->getLHS()->IgnoreParens(), false))
{
reportWarning(i);
}
@@ -415,7 +415,7 @@ bool ImplicitBoolConversion::TraverseBinOrAssign(CompoundAssignOperator * expr)
assert(!nested.empty());
for (auto i: nested.top()) {
if (i != expr->getRHS()->IgnoreParens()
- || !isBool(expr->getLHS()->IgnoreParens()))
+ || !isBool(expr->getLHS()->IgnoreParens(), false))
{
reportWarning(i);
}
@@ -431,7 +431,7 @@ bool ImplicitBoolConversion::TraverseBinXorAssign(CompoundAssignOperator * expr)
assert(!nested.empty());
for (auto i: nested.top()) {
if (i != expr->getRHS()->IgnoreParens()
- || !isBool(expr->getLHS()->IgnoreParens()))
+ || !isBool(expr->getLHS()->IgnoreParens(), false))
{
reportWarning(i);
}