summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-17 15:13:34 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:40:50 +0100
commit6d0c89123f353aed80d3a8a08ef5cd1ffaa1eea9 (patch)
tree59b3f214e068d3df6b08b2acd7647002946a6847 /compilerplugins
parent2269fd1d751d9b198cf9189125bd177151559596 (diff)
vclwidget: fix more places that should be wrapping in VclPtr
Change-Id: I31c9115662da2f81e1b22be91ee58e2862076b8e
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/vclwidgets.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index 365451417ece..13217f93ddf6 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -215,6 +215,29 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) {
pVarDecl->getLocation())
<< pVarDecl->getSourceRange();
}
+ 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<")
+ && containsWindowSubclass(pVarDecl->getType()))
+ {
+ report(
+ DiagnosticsEngine::Warning,
+ "vcl::Window subclass should be wrapped in VclPtr. " + pVarDecl->getType().getAsString(),
+ pVarDecl->getLocation())
+ << pVarDecl->getSourceRange();
+ }
return true;
}