From 2e43a109495b859b9e90db34c08e8eba11354bad Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 7 Dec 2015 17:08:32 +0100 Subject: [PATCH] No, "rtl::Reference> mpStatusListener;" is fine ...as a member of ImplCommandButtonData (vcl/source/control/button.cxx), no need to falsly warn "OutputDevice subclass 'rtl::Reference>' declared as a pointer member, should be wrapped in VclPtr [loplugin:vclwidgets]" Probably loplugin:vclwidgets should enable shouldVisitTemplateInstantiations() and not try to second-guess whether an OutputDevice can be a template argument. Change-Id: Ia8feb1b1d7504941c35dfbf0aa02dc6a7dd818a0 --- compilerplugins/clang/vclwidgets.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 90beed868914..0385ce046441 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -115,7 +115,11 @@ bool containsWindowSubclass(const Type* pType0) { if (pRecordDecl) { const ClassTemplateSpecializationDecl* pTemplate = dyn_cast(pRecordDecl); if (pTemplate) { - bool link = pTemplate->getQualifiedNameAsString() == "Link"; + auto name = pTemplate->getQualifiedNameAsString(); + if (name == "VclStatusListener") { + return false; + } + bool link = name == "Link"; for(unsigned i=0; igetTemplateArgs().size(); ++i) { const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i]; if (rArg.getKind() == TemplateArgument::ArgKind::Type &&