diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-07 17:08:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-07 17:12:39 +0100 |
commit | 2e43a109495b859b9e90db34c08e8eba11354bad (patch) | |
tree | ad1c8f00367477b410f35e637fe949c4e033103f /compilerplugins | |
parent | 201c55cbb3f757389f78971b32332c9fc8e3d271 (diff) |
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
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/vclwidgets.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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<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 && |