No, "rtl::Reference<VclStatusListener<Button>> mpStatusListener;" is fine

...as a member of ImplCommandButtonData (vcl/source/control/button.cxx), no need
to falsly warn "OutputDevice subclass 'rtl::Reference<VclStatusListener<Button>>'
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
This commit is contained in:
Stephan Bergmann 2015-12-07 17:08:32 +01:00
parent 201c55cbb3
commit 2e43a10949

View File

@ -115,7 +115,11 @@ bool containsWindowSubclass(const Type* pType0) {
if (pRecordDecl) {
const ClassTemplateSpecializationDecl* pTemplate = dyn_cast<ClassTemplateSpecializationDecl>(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; i<pTemplate->getTemplateArgs().size(); ++i) {
const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i];
if (rArg.getKind() == TemplateArgument::ArgKind::Type &&