diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-14 13:22:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-14 15:53:18 +0200 |
commit | e3706663a9ad5962155a5d23a6388cd648a49a05 (patch) | |
tree | b8b747aa7ec37fc454ee669ace6f5559279df2c0 | |
parent | f72cd57a3397088433df32baed5c1eb5210a6712 (diff) |
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 <sbergman@redhat.com>
-rw-r--r-- | compilerplugins/clang/stringadd.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
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; |