loplugin:stringadd fix condition

Change-Id: I7752c281b1b6dd0d26bd7d6c4a6896c663f4cbc3
Reviewed-on: https://gerrit.libreoffice.org/80921
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-10-16 20:20:26 +02:00
parent d51db77c8d
commit 01d28b0b85

View File

@@ -264,7 +264,8 @@ bool StringAdd::isSideEffectFree(Expr const* expr)
{
auto name = calleeMethodDecl->getName();
if (callExpr->getNumArgs() > 0
&& (name == "number" || name == "unacquired" || "boolean"))
&& (name == "number" || name == "unacquired" || name == "boolean"
|| name == "copy"))
{
auto tc = loplugin::TypeCheck(calleeMethodDecl->getParent());
if (tc.Class("OUString") || tc.Class("OString"))