[Libreoffice-commits] core.git: compilerplugins/clang

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 17 07:56:12 UTC 2019


 compilerplugins/clang/stringadd.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 01d28b0b85f99590c0581e4bbf636bc9281e0571
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 16 20:20:26 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 17 09:55:21 2019 +0200

    loplugin:stringadd fix condition
    
    Change-Id: I7752c281b1b6dd0d26bd7d6c4a6896c663f4cbc3
    Reviewed-on: https://gerrit.libreoffice.org/80921
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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"))


More information about the Libreoffice-commits mailing list