Improved loplugin:redundantcast (const-qualified typedefs)

...see comments to <https://gerrit.libreoffice.org/#/c/56661/> "This cast seems
completely unnecessary to me?"

Change-Id: I57d27cd2aa2dc94bc2e0b49fe06a09d31301cb7e
Reviewed-on: https://gerrit.libreoffice.org/56708
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2018-06-29 15:58:10 +02:00
parent 48cb5c7221
commit 15e51fbc57
2 changed files with 4 additions and 1 deletions

View File

@@ -268,7 +268,7 @@ bool isOkToRemoveArithmeticCast(
// suffix like L it could still be either long or long long):
if ((t1->isIntegralType(context)
|| t1->isRealFloatingType())
&& ((t1 != t2
&& ((t1.getLocalUnqualifiedType() != t2.getLocalUnqualifiedType()
&& (loplugin::TypeCheck(t1).Typedef()
|| loplugin::TypeCheck(t2).Typedef()))
|| isArithmeticOp(subExpr)