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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user