summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/weakobject.cxx
AgeCommit message (Collapse)AuthorFilesLines
2019-03-12make (some) clang plugins share the same RecursiveASTVisitorLuboš Luňák1-2/+9
Each plugin currently uses its own recursive AST run, which adds up. This patch adds another shared plugin which internally contains all (suitable) plugins and dispatches to them from the same one recursive run. This patch converts ~25 plugins and for starmath's accessibility.cxx reduces clang build time from 5.43s to 5.14s (and it's 4.39s without any plugins). As there are almost 50 more plugins to go, this can theoretically result in 4.56s final time, although probably not all plugins can be that easily converted, if at all. This mostly requires very little change in many plugins (see e.g. BadStatics), some even work without any functionality change (e.g. CharRightShift). Traverse* calls require some changes but are often not that difficult. WalkUp* probably can't be supported, although some plugins can(?) possibly be adjusted to not rely on them. And of course some plugins can be left as they are, using their own recursive run. See description at the top of generator.cxx for description of how to convert a plugin. The sharedvisitor.cxx source is generated based on scanning relevant plugin sources using a clang-based scanner/generator. The generated source is intentionally included instead of getting always generated, as the generating currently takes some time, so it should get updated in git whenever a change in a plugin triggers a source change in it. Change-Id: Ia0d2e3a5a464659503dbb4ed6c20b6cc89b4de01 Reviewed-on: https://gerrit.libreoffice.org/68026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-11change some clang plugins to FilteringPluginsLuboš Luňák1-3/+2
As far as I can tell these do not need to scan everything, so the filtering (and faster) base plugin is sufficient. Change-Id: I0912a730bb5ec9670d1faa5c83f573902118cc95 Reviewed-on: https://gerrit.libreoffice.org/68872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02remove connectivity OSubComponentNoel Grandin1-4/+0
push the logic that is still necessary down into the subclasses Change-Id: I99424f0b3c654c5652991a4140b17ceb02224e50 Reviewed-on: https://gerrit.libreoffice.org/49087 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07Clean away temporarily added using declarationsStephan Bergmann1-1/+2
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-09-29Adapt loplugins to clang-cl's (implicit) -fdelayed-template-parsingStephan Bergmann1-1/+3
...which is there for MSVC compatibility, but can cause getBody() to return null even when doesThisDeclarationHaveABody() is true. And in staticmethods.cxx we need to check doesThisDeclarationHaveABody() instead of hasBody(): For some class template member functions that are only defined outside their class definition, as is the case for OSequenceIterator::hasMoreElements in include/comphelper/sequence.hxx, hasBody() may be true for the original member function declaration inside the class (as there is some later definition that does have a body), but isLateTemplateParsed() is not (it is only true for the later definition). So just skip any such declarations that are not definitions (which is sane anyway, as otherwise such functions could pointlessly be inspected multiple times). Change-Id: I724f652a8f060a931f8b5fc3e4feb5f307a922bf Reviewed-on: https://gerrit.libreoffice.org/42914 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-01loplugin: use TypeCheck instead of getQualifiedNameAsStringNoel Grandin1-11/+11
since the latter is rather slow Change-Id: Ib73cdb923585580777c2265b561c1808e93b2baa Reviewed-on: https://gerrit.libreoffice.org/33585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-07-12Fix typo relase_ChildImpl -> release_ChildImplStephan Bergmann1-1/+1
Change-Id: I68faf8cfb8eb390e7970383b8a6596a9dd3f95f7
2016-06-28More Clang 3.4 "(anonymous namespace)" fixesStephan Bergmann1-1/+1
Change-Id: I7cb43f915565dadd611b90ee30373e472f97efb5 Reviewed-on: https://gerrit.libreoffice.org/26748 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-28Adapt to Clang 3.4 (in preparation of a buildbot on CentOS 7)Stephan Bergmann1-2/+3
Change-Id: Ie2859f03b31c57deb7fd0deba3285f782e33b239
2016-06-24Fix check for calls to OWeakObject::releaseStephan Bergmann1-8/+15
Change-Id: I90030dee12676eb356ebe2244358052cfcd725de
2016-06-24compilerplugins: add OWeakObject::release() override checkMichael Stahl1-0/+154
Change-Id: I767857545d7c91615cf162790c04f0016de9fdf6 Reviewed-on: https://gerrit.libreoffice.org/26555 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>