compilerplugins/clang/stringadd.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit e3706663a9ad5962155a5d23a6388cd648a49a05 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Oct 14 13:22:00 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Oct 14 15:53:18 2022 +0200 Clean up loplugin:stringadd ...after 3d236177be255b2027a997bfc12fe0833ca9a2f7 "Deduplicate O(U)StringConcatenation" changed OStringConcat and OUStringConcat into aliases (so they can never show up here in a "getUnqualifiedDesugareType"), but apparently forgot to drop their respective checks here. (That the then-added check for StringConcat works as intended is verified by compilerplugins/clang/test/stringadd.cxx, btw.) Change-Id: I2b589d977dbf2a384348cb7ee62acce30031ccec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141364 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index 9254e9190ed5..f090455e280f 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -231,9 +231,7 @@ bool StringAdd::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* operatorCall if (operatorCall->getOperator() != OO_Plus) return true; auto tc = loplugin::TypeCheck(operatorCall->getType()->getUnqualifiedDesugaredType()); - if (!tc.Struct("OUStringConcat").Namespace("rtl").GlobalNamespace() - && !tc.Struct("OStringConcat").Namespace("rtl").GlobalNamespace() - && !tc.Struct("StringConcat").Namespace("rtl").GlobalNamespace() + if (!tc.Struct("StringConcat").Namespace("rtl").GlobalNamespace() && !tc.Class("OUString").Namespace("rtl").GlobalNamespace() && !tc.Class("OString").Namespace("rtl").GlobalNamespace()) return true;