[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Tue Dec 8 00:45:58 PST 2015


 compilerplugins/clang/vclwidgets.cxx |   21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

New commits:
commit b0e427d8aac1a54681a2a6d0acbd1b54394961b9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 8 09:44:34 2015 +0100

    Remove apparently unnecessary checks
    
    ...they don't cause any change in behavior, likely they predated Noel's figuring
    out the template part of containsWindowSubclass
    
    Change-Id: I0d5b6bd7f228acef9a0ce1c85fe98fbab89bd7a8

diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index 0385ce0..89f80a5 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -246,26 +246,7 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) {
         return true;
     }
 
-    if (   !startsWith(pVarDecl->getType().getAsString(), "std::vector<vcl::Window *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "std::map<vcl::Window *, Size>")
-        && !startsWith(pVarDecl->getType().getAsString(), "std::map<vcl::Window *, class Size>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::vector<class Button *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::vector<Button *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::mem_fun1_t<")
-        && !startsWith(pVarDecl->getType().getAsString(), "::comphelper::mem_fun1_t<")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::pair<formula::RefButton *, formula::RefEdit *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::pair<RefButton *, RefEdit *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "std::list<SwSidebarWin *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::map<OTableWindow *, sal_Int32>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::map<class OTableWindow *, sal_Int32>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::multimap<sal_Int32, OTableWindow *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::std::multimap<sal_Int32, class OTableWindow *>")
-        && !startsWith(pVarDecl->getType().getAsString(), "::dbp::OMultiInstanceAutoRegistration< ::dbp::OUnoAutoPilot<")
-        && !startsWith(pVarDecl->getType().getAsString(), "SwSidebarWin_iterator")
-        && !startsWith(pVarDecl->getType().getAsString(), "functor_vector_type")
-        && !startsWith(pVarDecl->getType().getAsString(), "const functor_vector_type")
-        && containsWindowSubclass(pVarDecl->getType()))
-    {
+    if (containsWindowSubclass(pVarDecl->getType())) {
         report(
             DiagnosticsEngine::Warning,
             "OutputDevice subclass %0 should be wrapped in VclPtr",


More information about the Libreoffice-commits mailing list