diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-13 09:57:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-13 13:50:53 +0200 |
commit | 3d99ae3f98f3333b0aba4f213fc40f4c22ab9cf5 (patch) | |
tree | 27cc62144a751809c832cae1aa782865f6a07eec /compilerplugins | |
parent | b641fccab785cc7dede720f7d5844e4f0cb95b91 (diff) |
loplugin:methodcycles
Change-Id: Ia14e47b811ca56d8d4517f262e008985d6aebe35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122020
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/methodcycles.partition.results | 12 | ||||
-rwxr-xr-x | compilerplugins/clang/methodcycles.py | 12 | ||||
-rw-r--r-- | compilerplugins/clang/methodcycles.results | 172 |
3 files changed, 128 insertions, 68 deletions
diff --git a/compilerplugins/clang/methodcycles.partition.results b/compilerplugins/clang/methodcycles.partition.results index 049fe2555a32..9c31146daa6f 100644 --- a/compilerplugins/clang/methodcycles.partition.results +++ b/compilerplugins/clang/methodcycles.partition.results @@ -1,12 +1,8 @@ -callDict size 4 +callDict size 2 -std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > writerfilter::ooxml::OOXMLFastContextHandler::getType() const -writerfilter/source/ooxml/OOXMLFastContextHandler.hxx:88 - void sax_fastparser::FastSaxSerializer::ForMerge::print() -sax/source/tools/fastserializer.hxx:184 - -SvTreeListEntry * SvTabListBox::InsertEntryToColumn(const rtl::OUString &,unsigned long,unsigned short,void *) -include/vcl/svtabbx.hxx:86 +sax/source/tools/fastserializer.hxx:185 +std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > writerfilter::ooxml::OOXMLFastContextHandler::getType() const +writerfilter/source/ooxml/OOXMLFastContextHandler.hxx:85 diff --git a/compilerplugins/clang/methodcycles.py b/compilerplugins/clang/methodcycles.py index 1b0ef2b1ef71..52b950b86f76 100755 --- a/compilerplugins/clang/methodcycles.py +++ b/compilerplugins/clang/methodcycles.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 from collections import defaultdict import io @@ -33,7 +33,7 @@ def normalizeTypeParams( line ): # -------------------------------------------------------------------------------------------- cnt = 0 -with io.open("workdir/loplugin.methodcycles.log", "rb", buffering=1024*1024) as txt: +with io.open("workdir/loplugin.methodcycles.log", "r", buffering=1024*1024) as txt: for line in txt: tokens = line.strip().split("\t") if tokens[0] == "definition:": @@ -131,10 +131,10 @@ uno_constructor_entrypoints = set() git_grep_process = subprocess.Popen("git grep -h 'constructor=' -- *.component", stdout=subprocess.PIPE, shell=True) with git_grep_process.stdout as txt: for line in txt: - idx1 = line.find("\"") - idx2 = line.find("\"", idx1 + 1) + idx1 = line.find(b"\"") + idx2 = line.find(b"\"", idx1 + 1) func = line[idx1+1 : idx2] - uno_constructor_entrypoints.add(func) + uno_constructor_entrypoints.add(func.decode('utf-8')) for caller in callDict: if "(com::sun::star::uno::XComponentContext *,const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)" in caller: for func in uno_constructor_entrypoints: @@ -263,4 +263,4 @@ def print_partitions(): count = count + 1 if count>1000: break -print_partitions()
\ No newline at end of file +print_partitions() diff --git a/compilerplugins/clang/methodcycles.results b/compilerplugins/clang/methodcycles.results index 5b8414cea0fb..60786eee9335 100644 --- a/compilerplugins/clang/methodcycles.results +++ b/compilerplugins/clang/methodcycles.results @@ -1,93 +1,157 @@ found cycle - unsigned long slideshow::internal::hash::operator()(const type-parameter-?-? &) const - slideshow/source/inc/tools.hxx:84 + void LogProbe(bool,void *,void *,_typelib_TypeDescriptionReference *,_typelib_MethodParameter *,int,const _typelib_TypeDescription *,void *,void **,_uno_Any **) + cppu/source/LogBridge/LogBridge.cxx:188 - unsigned long com::sun::star::uno::hash_value(const Reference<type-parameter-?-?> &) - slideshow/source/inc/tools.hxx:94 + void uno_ext_getMapping(_uno_Mapping **,_uno_Environment *,_uno_Environment *) + bridges/source/jni_uno/jni_bridge.cxx:514 -found cycle void (anonymous namespace)::traceValue(_typelib_TypeDescriptionReference *,void *) cppu/source/LogBridge/LogBridge.cxx:128 - void uno_ext_getMapping(_uno_Mapping **,_uno_Environment *,_uno_Environment *) - bridges/source/jni_uno/jni_bridge.cxx:514 +found cycle + void svl::Items_t::fill(typename array<pair<unsigned short, unsigned short>, sizeof...(WIDs) / 2>::iterator) + include/svl/whichranges.hxx:52 - void LogProbe(bool,void *,void *,_typelib_TypeDescriptionReference *,_typelib_MethodParameter *,int,const _typelib_TypeDescription *,void *,void **,_uno_Any **) - cppu/source/LogBridge/LogBridge.cxx:188 + array<std::pair<unsigned short, unsigned short>, sizeof...(WIDs) / 2> svl::Items_t::make() + include/svl/whichranges.hxx:59 found cycle - void chart::ChartTypeDialogController::adjustParameterToMainType(chart::ChartTypeParameter &) - chart2/source/controller/dialogs/ChartTypeDialogController.hxx:116 + void weld::IconView::select_all() + include/vcl/weld.hxx:1385 - chart::ChartTypeTabPage::ChartTypeTabPage(weld::Container *,weld::DialogController *,const com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> &,bool) - chart2/source/controller/dialogs/tp_ChartType.hxx:48 + void weld::IconView::unselect(int) + include/vcl/weld.hxx:1370 - void chart::ChartTypeTabPage::selectMainType() - chart2/source/controller/dialogs/tp_ChartType.hxx:67 +found cycle + SvTreeListEntry * SvTreeListBox::InsertEntry(const rtl::OUString &,const Image &,const Image &,SvTreeListEntry *,bool,unsigned int,void *) + include/vcl/toolkit/treelistbox.hxx:559 - void chart::ChartTypeTabPage::LinkStubSelectMainTypeHdl(void *,weld::TreeView &) - chart2/source/controller/dialogs/tp_ChartType.hxx:69 + SvTreeListEntry * SvTabListBox::InsertEntryToColumn(const rtl::OUString &,const Image &,const Image &,SvTreeListEntry *,unsigned int,unsigned short,void *) + include/vcl/toolkit/svtabbx.hxx:79 - void chart::ChartTypeTabPage::SelectMainTypeHdl(weld::TreeView &) - chart2/source/controller/dialogs/tp_ChartType.hxx:69 +found cycle + void CGM::ImplDefaultReplacement() + filter/source/graphicfilter/icgm/cgm.hxx:115 + + void CGM::ImplDoClass() + filter/source/graphicfilter/icgm/cgm.hxx:116 + + void CGM::ImplDoClass0() + filter/source/graphicfilter/icgm/cgm.hxx:117 + + unsigned int ImportCGM(SvStream &,const com::sun::star::uno::Reference<com::sun::star::frame::XModel> &,const com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> &) + filter/source/graphicfilter/icgm/cgm.cxx:686 + + bool CGM::Write(SvStream &) + filter/source/graphicfilter/icgm/cgm.hxx:137 found cycle - void SbxVariable::Dump(SvStream &,bool) - include/basic/sbxvar.hxx:262 + bool ::operator()(weld::TreeIter &) const + reportdesign/source/ui/dlg/Navigator.cxx:234 - void SbxObject::Dump(SvStream &,bool) - include/basic/sbxobj.hxx:80 + void basctl::(anonymous namespace)::implCollapseModifiedObjectEntry(weld::TreeIter &,weld::TreeView &) + basctl/source/basicide/baside2b.cxx:2286 - void SbRtl_DumpAllObjects(StarBASIC *,SbxArray &,bool) - basic/source/inc/rtlproto.hxx:293 +found cycle + bool ::operator()(weld::TreeIter &) const + reportdesign/source/ui/dlg/Navigator.cxx:234 + + bool FmEntryData::IsEqualWithoutChildren(FmEntryData *) + svx/source/inc/fmexpl.hxx:159 found cycle - SvxMenuConfigPage::SvxMenuConfigPage(weld::Container *,weld::DialogController *,const SfxItemSet &,bool) - cui/source/inc/SvxMenuConfigPage.hxx:59 + void sdext::presenter::PresenterToolBar::ProcessEntry(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &,const sdext::presenter::PresenterToolBar::Context &) + sdext/source/presenter/PresenterToolBar.hxx:183 + + void ::operator()(const rtl::OUString &,const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &) const + sdext/source/presenter/PresenterToolBar.cxx:611 - void SvxMenuConfigPage::LinkStubGearHdl(void *,const rtl::OString &) - cui/source/inc/SvxMenuConfigPage.hxx:35 + void sdext::presenter::(anonymous namespace)::Element::SetModes(const std::shared_ptr<sdext::presenter::(anonymous namespace)::ElementMode> &,const std::shared_ptr<sdext::presenter::(anonymous namespace)::ElementMode> &,const std::shared_ptr<sdext::presenter::(anonymous namespace)::ElementMode> &,const std::shared_ptr<sdext::presenter::(anonymous namespace)::ElementMode> &,const std::shared_ptr<sdext::presenter::(anonymous namespace)::ElementMode> &) + sdext/source/presenter/PresenterToolBar.cxx:129 - rtl::OUString SvxConfigPageHelper::generateCustomMenuURL(std::::vector<SvxConfigEntry *, std::allocator<SvxConfigEntry *> > *,int) - cui/source/inc/SvxConfigPageHelper.hxx:46 +found cycle + void cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile &,const cppcanvas::internal::ActionFactoryParameters &,bool) + cppcanvas/source/inc/implrenderer.hxx:170 - SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(weld::Window *,std::::vector<SvxConfigEntry *, std::allocator<SvxConfigEntry *> > *,const SvxConfigEntry *,bool) - cui/source/inc/cfg.hxx:507 + cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> &,const GDIMetaFile &,const cppcanvas::Renderer::Parameters &) + cppcanvas/source/inc/implrenderer.hxx:122 - void SvxMenuConfigPage::GearHdl(const rtl::OString &) - cui/source/inc/SvxMenuConfigPage.hxx:35 + void cppcanvas::internal::ImplRenderer::createGradientAction(const tools::PolyPolygon &,const Gradient &,const cppcanvas::internal::ActionFactoryParameters &,bool,bool) + cppcanvas/source/inc/implrenderer.hxx:185 found cycle - sd::UndoAnimationPath::UndoAnimationPath(SdDrawDocument *,SdPage *,const com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &) - sd/inc/undoanim.hxx:55 + void SbxObject::Dump(SvStream &,bool) + include/basic/sbxobj.hxx:80 - sd::UndoAnimationPathImpl::UndoAnimationPathImpl(SdPage *,const com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &) - sd/source/core/undoanim.cxx:119 + void SbRtl_DumpAllObjects(StarBASIC *,SbxArray &,bool) + basic/source/inc/rtlproto.hxx:290 - int sd::EffectSequenceHelper::getOffsetFromEffect(const std::shared_ptr<sd::CustomAnimationEffect> &) const - sd/inc/CustomAnimationEffect.hxx:324 + void SbxVariable::Dump(SvStream &,bool) + include/basic/sbxvar.hxx:268 found cycle - sd::UndoAnimationPath::UndoAnimationPath(SdDrawDocument *,SdPage *,const com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &) - sd/inc/undoanim.hxx:55 + unsigned long com::sun::star::uno::hash_value(const Reference<type-parameter-?-?> &) + slideshow/source/inc/tools.hxx:86 - std::shared_ptr<sd::CustomAnimationEffect> sd::EffectSequenceHelper::findEffect(const com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &) const - sd/inc/CustomAnimationEffect.hxx:288 + unsigned long slideshow::internal::hash::operator()(const type-parameter-?-? &) const + slideshow/source/inc/tools.hxx:76 - sd::UndoAnimationPathImpl::UndoAnimationPathImpl(SdPage *,const com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &) - sd/source/core/undoanim.cxx:119 +found cycle + std::unique_ptr<SdrUndoAction, std::default_delete<SdrUndoAction> > SdrUndoFactory::CreateUndoPageRemoveMasterPage(SdrPage &) + include/svx/svdundo.hxx:736 + + SdrUndoDelPage::SdrUndoDelPage(SdrPage &) + include/svx/svdundo.hxx:562 found cycle - void GtkInstanceAssistant::find_sidebar(_GtkWidget *,void *) - vcl/unx/gtk3/gtk3gtkinst.cxx:4162 + void oox::PropertyMap::dumpCode(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &) + include/oox/helper/propertymap.hxx:113 - GtkInstanceAssistant::GtkInstanceAssistant(_GtkAssistant *,GtkInstanceBuilder *,bool) - vcl/unx/gtk3/gtk3gtkinst.cxx:4185 + const char * oox::lclDumpAnyValueCode(const com::sun::star::uno::Any &,int) + oox/source/helper/propertymap.cxx:548 found cycle + void ScDPResultMember::DumpState(const ScDPResultMember *,ScDocument *,ScAddress &) const + sc/inc/dptabres.hxx:404 + void ScDPResultDimension::DumpState(const ScDPResultMember *,ScDocument *,ScAddress &) const - sc/inc/dptabres.hxx:573 + sc/inc/dptabres.hxx:572 - void ScDPResultMember::DumpState(const ScDPResultMember *,ScDocument *,ScAddress &) const - sc/inc/dptabres.hxx:405 +found cycle + void ScXMLSourceDlg::LoadSourceFileStructure(const rtl::OUString &) + sc/source/ui/inc/xmlsourcedlg.hxx:77 + + void ScXMLSourceDlg::LinkStubBtnPressedHdl(void *,weld::Button &) + sc/source/ui/inc/xmlsourcedlg.hxx:101 + + void (anonymous namespace)::populateTree(weld::TreeView &,orcus::xml_structure_tree::walker &,const orcus::xml_structure_tree::entity_name &,bool,const weld::TreeIter *,ScOrcusXMLTreeParam &) + sc/source/filter/orcus/xmlcontext.cxx:70 + + void ScXMLSourceDlg::SelectSourceFile() + sc/source/ui/inc/xmlsourcedlg.hxx:76 + + void ScXMLSourceDlg::BtnPressedHdl(weld::Button &) + sc/source/ui/inc/xmlsourcedlg.hxx:101 + + ScXMLSourceDlg::ScXMLSourceDlg(SfxBindings *,SfxChildWindow *,weld::Window *,ScDocument *) + sc/source/ui/inc/xmlsourcedlg.hxx:66 + + void ScOrcusXMLContext::loadXMLStructure(weld::TreeView &,ScOrcusXMLTreeParam &) + sc/inc/orcusfilters.hxx:63 + +found cycle + void (anonymous namespace)::getFieldLinks(ScOrcusImportXMLParam::RangeLink &,std::::vector<unsigned long, std::allocator<unsigned long> > &,const weld::TreeView &,const weld::TreeIter &) + sc/source/ui/xmlsource/xmlsourcedlg.cxx:448 + + void ScXMLSourceDlg::LinkStubBtnPressedHdl(void *,weld::Button &) + sc/source/ui/inc/xmlsourcedlg.hxx:101 + + void ScXMLSourceDlg::BtnPressedHdl(weld::Button &) + sc/source/ui/inc/xmlsourcedlg.hxx:101 + + ScXMLSourceDlg::ScXMLSourceDlg(SfxBindings *,SfxChildWindow *,weld::Window *,ScDocument *) + sc/source/ui/inc/xmlsourcedlg.hxx:66 + + void ScXMLSourceDlg::OkPressed() + sc/source/ui/inc/xmlsourcedlg.hxx:97 |