compilerplugins/clang/vclwidgets.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2e43a109495b859b9e90db34c08e8eba11354bad
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Mon Dec 7 17:08:32 2015 +0100

    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

diff --git a/compilerplugins/clang/vclwidgets.cxx 
b/compilerplugins/clang/vclwidgets.cxx
index 90beed8..0385ce0 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 &&
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to