loplugin: use TypeCheck instead of getQualifiedNameAsString
since the latter is rather slow Change-Id: Ib73cdb923585580777c2265b561c1808e93b2baa Reviewed-on: https://gerrit.libreoffice.org/33585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "plugin.hxx"
|
||||
#include "check.hxx"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -26,8 +27,9 @@ Expr const * stripCtor(Expr const * expr) {
|
||||
if (e3 == nullptr) {
|
||||
return expr;
|
||||
}
|
||||
auto const n = e3->getConstructor()->getQualifiedNameAsString();
|
||||
if (n != "rtl::OString::OString" && n != "rtl::OUString::OUString") {
|
||||
auto qt = loplugin::DeclCheck(e3->getConstructor());
|
||||
if (!qt.Function("OString").Class("OString").Namespace("rtl").GlobalNamespace() &&
|
||||
!qt.Function("OUString").Class("OUString").Namespace("rtl").GlobalNamespace()) {
|
||||
return expr;
|
||||
}
|
||||
if (e3->getNumArgs() != 2) {
|
||||
|
Reference in New Issue
Block a user