From 01d28b0b85f99590c0581e4bbf636bc9281e0571 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Oct 2019 20:20:26 +0200 Subject: [PATCH] loplugin:stringadd fix condition Change-Id: I7752c281b1b6dd0d26bd7d6c4a6896c663f4cbc3 Reviewed-on: https://gerrit.libreoffice.org/80921 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/stringadd.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index 986b2f938c7d..1a9c7c90d152 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -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"))