diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-15 11:20:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-15 14:09:03 +0100 |
commit | 2a1533b0191508d4836a0f4fd1f4c8011a467d9f (patch) | |
tree | 20810f54bdd9b964d02e539ed5d1438f85af0d0d /compilerplugins/clang/consttobool.cxx | |
parent | 4b54a23a0eedbf52402dfadc3c133888ebaf588f (diff) |
Add loplugin:consttobool assert-related tests
...and improve diagnostics a bit
Change-Id: I3233aa1752620ddbe6fbeff93b15565921f0bc2e
Reviewed-on: https://gerrit.libreoffice.org/82767
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/consttobool.cxx')
-rw-r--r-- | compilerplugins/clang/consttobool.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compilerplugins/clang/consttobool.cxx b/compilerplugins/clang/consttobool.cxx index 8f7823aa8816..21fde3f547b1 100644 --- a/compilerplugins/clang/consttobool.cxx +++ b/compilerplugins/clang/consttobool.cxx @@ -207,6 +207,11 @@ public: suggestion = true; replacement = false; } + else if (res.isLValue()) + { + suggestion = true; + replacement = true; + } else { suggestion = false; |