summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-12-07 17:08:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-12-07 17:12:39 +0100
commit2e43a109495b859b9e90db34c08e8eba11354bad (patch)
treead1c8f00367477b410f35e637fe949c4e033103f /compilerplugins
parent201c55cbb3f757389f78971b32332c9fc8e3d271 (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.cxx6
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 &&