From 4b9acb48b1ea45c82dbd8df3faa35cabd3bb9b4d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 17 Mar 2023 19:06:45 +0200 Subject: loplugin:stringadd use more O[U]StringChar Change-Id: I196e4539ad430a39415eff9d7170b33df7228230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/stringadd.cxx | 8 -------- 1 file changed, 8 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index f090455e280f..1bf414e6d261 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -276,10 +276,6 @@ bool StringAdd::VisitCXXMemberCallExpr(CXXMemberCallExpr const* methodCall) if (!tc1.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() && !tc1.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) return true; - auto paramType = methodDecl->getParamDecl(0)->getType(); - // char is still a pain to work with, when constructing a chained + - if (paramType->isCharType() || loplugin::TypeCheck(paramType).Typedef("sal_Unicode")) - return true; auto arg = methodCall->getArg(0); // I don't think the OUStringAppend functionality can handle this efficiently if (isa(ignore(arg))) @@ -296,10 +292,6 @@ bool StringAdd::VisitCXXMemberCallExpr(CXXMemberCallExpr const* methodCall) if (!methodDecl2->getIdentifier() || methodDecl2->getName() != "append" || methodCall2->getNumArgs() == 0) return true; - auto paramType2 = methodDecl2->getParamDecl(0)->getType(); - // char is still a pain to work with, when constructing a chained + - if (paramType2->isCharType() || loplugin::TypeCheck(paramType2).Typedef("sal_Unicode")) - return true; arg = methodCall2->getArg(0); // I don't think the OUStringAppend functionality can handle this efficiently if (isa(ignore(arg))) -- cgit