summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/stringadd.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-17 19:06:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-18 07:20:51 +0000
commit4b9acb48b1ea45c82dbd8df3faa35cabd3bb9b4d (patch)
tree963dde5c91fc5030365b8dcf035bac57e26436f3 /compilerplugins/clang/stringadd.cxx
parent6f54b54ec3dc51fb8824adb08620fde4c70d10f2 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/stringadd.cxx')
-rw-r--r--compilerplugins/clang/stringadd.cxx8
1 files changed, 0 insertions, 8 deletions
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<ConditionalOperator>(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<ConditionalOperator>(ignore(arg)))