diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-11 12:11:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-12 13:11:16 +0100 |
commit | 36b90e6c23fc846c9a8b4ddbd74688b2b5cc4705 (patch) | |
tree | 0cece42f160c3f695149aeaf8d3d2e1d203fedc9 /compilerplugins/clang | |
parent | 5194b93c8dffe4a2194c35e91949ed5b88b567e2 (diff) |
loplugin:finalclasses
Change-Id: Ia9865271cf0a75ebf4b885ff376f7d0a152b2555
Reviewed-on: https://gerrit.libreoffice.org/84925
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang')
-rwxr-xr-x | compilerplugins/clang/finalclasses.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/compilerplugins/clang/finalclasses.py b/compilerplugins/clang/finalclasses.py index f6c15ca2c87d..ea027f9a48b4 100755 --- a/compilerplugins/clang/finalclasses.py +++ b/compilerplugins/clang/finalclasses.py @@ -40,6 +40,24 @@ for clazz in sorted(definitionSet - inheritFromSet): # ignore test and external code if ("/qa/" in file): continue if (file.startswith("workdir/")): continue + # We are only realling interested in classes that are shared between linkage units, where the compiler + # is not able to figure out for itself that classes are final. + if not(file.startswith("include/") or file.startswith("sw/inc/") or file.startswith("sc/inc/") or file.startswith("vcl/inc/")): continue + # Exclude URE + if file.startswith("include/com/"): continue + if file.startswith("include/cppu/"): continue + if file.startswith("include/cppuhelper/"): continue + if file.startswith("include/osl/"): continue + if file.startswith("include/rtl/"): continue + if file.startswith("include/sal/"): continue + if file.startswith("include/salhelper/"): continue + if file.startswith("include/systools/"): continue + if file.startswith("include/typelib/"): continue + if file.startswith("include/uno/"): continue + # some kind of template noise + if file.startswith("include/unotest/"): continue + # no point optimising test code + if file.startswith("include/test/"): continue tmpset.add((clazz, file)) # sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely |