Age | Commit message (Collapse) | Author |
|
for example this was not found:
extensions/source/update/check/updatecheck.cxx:58:namespace frame = com::sun::star::frame ;
due to the missing using and the space before the semicolon
but IWYU correctly detected it as unused
Change-Id: I404c93d41aec1a571c9ac49db7b7c7e8da824bf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165698
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
|
|
Add 'star' for com::sun::star instances
Add some vcl-specific ones
'PackageKit' gave always a false warning due to the similarity in
org/freedesktop/PackageKit/*hpp
and
officecfg::Office::Common::PackageKit::*
Change-Id: I109e7a2e8d7588d62b2a6bec2e55ec32e993e49e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165697
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
|
|
Change-Id: I40e237a2acfe67cb9b40f1018e1a236616b2fe29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164971
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
Sometimes there are unneeded namespaces included, these can be detected
from the IWYU output.
This mode makes a suggestion to remove these, then in a subsequent normal
run some more headers can be detected as unnecessary, whose presence was
justified by the "using namespace" statement.
Change-Id: I45616537925ec0d09039edf3d9237ffbd13e2410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164939
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Used pyflakes to find unused imports from bin/ folder. Then, removed
those unused imports.
Change-Id: I439dbc443d6da6d82700ff9caf2f4f2677f46b5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158819
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Hossein <hossein@libreoffice.org>
|
|
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ia40717df6d6137ca5a8f6d91dd5b95a1decbaa72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156991
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I5bd726b33e4fc7068baad91ff185763274307b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133308
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I85013e2fc1150b1830fa21da7ed77ac95ff7452e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133352
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
To ignore the excludelist, thereby checking if its exclusions
are still valid.
It may happen that some refactorings make an exclusion obsolete.
In this case the IWYU suggestion to remove a now-really-unnecessary
header would be ignored forever.
It makes sense to use it after a full cleanup of a module in normal mode.
Change-Id: I8216a79ea2354ab428d6ce7a56a49e5cf67056fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133307
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
It might happen that some files are removed/renamed
warn about such files to adjust filter rules
Change-Id: Ib8f1c586a67310cc8be04edfcc75f655da2dbfe0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129881
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
sounds more natural than --dontstop
Change-Id: I4650f8bf97a426782828f0e088805551c5830acc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129880
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
* as seen in vcl/inc/skia/salbmp.hxx
* also remove earlier exception from ucb modules file
Change-Id: Ie0ad46048147916b615f74d8eab6e033c2020565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126739
Tested-by: Jenkins
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I738d191415db130d875d5b7139ff768ad389dd93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120070
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
It fails like this:
loolforkit: sw/source/core/layout/wsfrm.cxx:4551: void UnHide(SwRootFrame&): Assertion `rLayout.GetCurrShell()->ActionPend()' failed.
#4 0x00007f98e9f8c198 in UnHide(SwRootFrame&) (rLayout=...) at sw/source/core/layout/wsfrm.cxx:4551
#5 0x00007f98e9f8c839 in SwRootFrame::SetHideRedlines(bool) (this=0x7f98c40f7bd0, bHideRedlines=false) at sw/source/core/layout/wsfrm.cxx:4664
#6 0x00007f98e9b18afd in sw::DocumentRedlineManager::SetRedlineFlags(RedlineFlags) (this=0x80a4120, eMode=49) at sw/source/core/doc/DocumentRedlineManager.cxx:1097
#7 0x00007f98e9cfa503 in SwEditShell::SetAttrSet(SfxItemSet const&, SetAttrMode, SwPaM*, bool) (this=0x8885840, rSet=
SfxItemSet of pool 0x808fd10 with parent 0x0 and Which ranges: [(63, 64), (120, 120)] = {...}, nFlags=SetAttrMode::DEFAULT, pPaM=0x0, bParagraphSetting=true)
at sw/source/core/edit/edatmisc.cxx:187
#8 0x00007f98ea995f07 in SwTextShell::ExecParaAttr(SfxRequest&) (this=0x8bd0820, rReq=...) at sw/source/uibase/shells/txtattr.cxx:451
Fix it the same way commit dd489bc01adc22fc5015ea56b61d66104af184a8
(tdf#125754 sw_redlinehide: avoid recursive layout in SetHideRedlines(),
2019-06-19) did: make sure that SetHideRedlines() is called before
EndAllAction().
Change-Id: I6304abec2e2e2967a8369b0219492bebcd606d03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120069
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
so that --recursive checks only header files.
if omitted, --recursive checks source files.
Change-Id: I7406e90dc4df4603b62d23751d3c78a1fdedec38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118959
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
so that f-u-i will be able to find files to check on its own.
Previously you had to find foo -name "*cxx" | xargs bin/f-u-i
Now its a bit easier to mass-check files.
Change-Id: I2823832ce8335a30493cf9f538f6fc5baec42dde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118875
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
...to make it not stop after each error found.
In case there are not many problems to be expected, it is faster to
check a bunch of files and fix the problematic 5% than re-check
over and over again the non-problematic ones after each error found.
Change-Id: Iec5a2aa96ac557c0247ae2f06eb710daa75cc19b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117756
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
After upgrading to Ubuntu 20.04 I got this warning:
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
Change f-u-i per instructions on website above to fix this warning.
Change-Id: I4424b0ced49d81dceb33131e1df150387a89df4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116748
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
And fix bin/find-unneeded-includes to not report noise on
PDFiumLibrary.cxx.
Change-Id: I93337e49a5656349089bdb790876bebe8505082c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109656
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I90d4e3db3eefa41f8492cfe23c5088ea93134afc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101890
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ib728bcd332400df7e6c5466387fcdbda97792382
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98489
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Background and motivation:
https://tools.ietf.org/html/draft-knodel-terminology-02
Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
...now that macOS builds are guaranteed to have std::optional since
358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to
Xcode 11.3 and macOS 10.14.4".
The change is done mostly mechanically with
> for i in $(git grep -Fl optional); do
> sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \
> -e 's/\<o3tl::optional\>/std::optional/g' \
> -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i"
> done
> for i in $(git grep -Flw o3tl::nullopt); do
> sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i"
> done
(though that causes some of the resulting
#include <optional>
to appear at different places relative to other includes than if they had been
added manually), plus a few manual modifications:
* adapt bin/find-unneeded-includes
* adapt desktop/IwyuFilter_desktop.yaml
* remove include/o3tl/optional.hxx
* quote resulting "<"/">" as "<"/">" in officecfg/registry/cppheader.xsl
* and then solenv/clang-format/reformat-formatted-files
Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is just a workaround, see the upstream bugreport for the details.
Change-Id: I2334fb3ad86db7f43bd49c694eea3c240316bfa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88566
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
When IWYU is used to check cxx files it also checks associated
hxx (but for .hxx -> .h too) files too and gives addition/removal recommendations
There is no documented way of disabling this.
Currently f-u-i does not differentiate between recommendations for the
checked file and its header and prints everything.
Which means sometimes I need to update .hxx files or blacklist warnings
that interestingly are not shown when the same .hxx is checked with IWYU.
The worst example is ucb/source/ucp/ftp/curl.hxx where IWYU gives recommendations
for /usr/include/x86_64-linux-gnu/curl/curl.h
Remedy this with considering the full
filename + should add these lines: / should remove these lines:
string as beginning of interesting recommendations
Also remove some now obsolete blacklist entries from yaml files
Change-Id: I1d139536992e4b56c699c31a4cc6491d373c2002
Reviewed-on: https://gerrit.libreoffice.org/80172
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ibc0b818a410cf0aee19b1d2a42a53db9aff87638
Reviewed-on: https://gerrit.libreoffice.org/76461
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This is helpful when checking and rechecking the detailed output.
It happens often that removing an unnecessary header makes it
necessary to add a transitively included header. This is
indicated by an error message referring to a now unknown class name.
Finding that header was hard because the default 80 char output limit
usually truncates the class names.
Change-Id: Iae08bc326625961009038007db4a982859f64c8c
Reviewed-on: https://gerrit.libreoffice.org/75598
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
in the ooo/vba namespace either. Quite frequent in sc/source/ui/vba
Change-Id: I62c89bb430455f025b25f1246e55012b411db21e
Reviewed-on: https://gerrit.libreoffice.org/75597
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
In case of non self contained files IYYU gives only error messages.
Prepare for that and print the failing command for further investigation.
Change-Id: I744338ab14d4a6cba5e02f842ff74b156c5178a4
Reviewed-on: https://gerrit.libreoffice.org/74111
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen in vcl/inc/widgetdraw/WidgetDefinition.hxx
Change-Id: Ic56ebd0f1c62b7cad25694b95bf8f91435169db9
Reviewed-on: https://gerrit.libreoffice.org/73753
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
..and replace with debug header if multimap is used.
As seen in include/svx/SmartTagMgr.hxx
Change-Id: If239cd6e9471f74f3035c659077ed7515a9df473
Reviewed-on: https://gerrit.libreoffice.org/73367
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
Removal of those have to be decided manually:
1) If it would be removed to be replaced with an include, that's bad.
2) If the fwd decls is truly unused, that's good.
Focus on the mechanical part: removal of includes which are unused, and
where removal doesn't introduce a transitive dependency.
Verified that e.g. writerfilter/source/dmapper/DomainMapper.cxx reports
no removals now, but including e.g. filter/msfilter/rtfutil.hxx in
either writerfilter/source/dmapper/DomainMapper.cxx or
writerfilter/source/dmapper/DomainMapper.hxx triggers a removal hint.
Change-Id: I4c359318113ccba421a125984e23c9778567ea4e
Reviewed-on: https://gerrit.libreoffice.org/73240
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Verified that e.g. writerfilter/source/dmapper/DomainMapper.cxx used to
trigger advices to replace includes with forward-declarations, and now
that's gone.
See https://gerrit.libreoffice.org/#/c/72972/ for motivation, there are
cases where a forward-declaration depends on the version of the
external, while the include does not, so such changes have to be done
with more care.
Change-Id: I86d396ac743b3fc425868ffda26c0c9e85a00d0e
Reviewed-on: https://gerrit.libreoffice.org/73221
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen in tools/source/misc/cpuid.cxx
Change-Id: Ic596cca387efc1c310f65cbed141946be0742371
Reviewed-on: https://gerrit.libreoffice.org/71885
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
As seen in configmgr/source/modifications.hxx and
configmgr/source/partial.hxx
this replacement is not needed
Change-Id: I6a8d7bc37779f305fccb5d3c7df22fba4a4f73d0
Reviewed-on: https://gerrit.libreoffice.org/72013
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
As seen in sw/source/core/inc/layact.hxx
Change-Id: Icc4281cd57b0cd8310a1044f6106691a5d1cd3c4
Reviewed-on: https://gerrit.libreoffice.org/71884
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen in tools/source/inet/inetmime.cxx
Change-Id: I3122e07a01020e84b5b75bc46dcaca33560b84bb
Reviewed-on: https://gerrit.libreoffice.org/71558
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
So it gives no false positives as currently seen in e.g.
include/sfx2/charmapcontrol.hxx
include/sfx2/docinsert.hxx
Change-Id: I087a949875df20c4ef25a10c80571bb57334cf80
Reviewed-on: https://gerrit.libreoffice.org/70400
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen in include/sfx2/sidebar/Paint.hxx
this replacement is not needed
Change-Id: Idba8014a7effaec69c06891657cbd62546b7ac09
Reviewed-on: https://gerrit.libreoffice.org/70026
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Turns out plain dictionary requires keys to be unique.
So we need to store values as lists.
This way there are no more false positives for <set> as in
include/sfx2/linkmgr.hxx and include/sfx2/objsh.hxx
Thanks Miklos for the advice!
Change-Id: Ie2cfb63644d6cbd51171eb95e3bcdd9246343efa
Reviewed-on: https://gerrit.libreoffice.org/69953
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen in include/sfx2/dispatch.hxx IWYU proposes to replace
o3tl/span.hxx with fw declaration, but that won't compile
Change-Id: If5739075bd91511cf22a39f3382c424c21829053
Reviewed-on: https://gerrit.libreoffice.org/69397
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen while cleaning sd/source/ui/dlg/TemplateScanner.cxx
Change-Id: I31a6892b4419947a411b2c4100281d4cf7c50f09
Reviewed-on: https://gerrit.libreoffice.org/68969
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As proposed in https://gerrit.libreoffice.org/#/c/67473/
Change-Id: Ibbc2d32dde2363502915cfeb036fa6f4ba568932
Reviewed-on: https://gerrit.libreoffice.org/67574
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
As seen while analysing
sw/source/core/inc/DocumentChartDataProviderManager.hxx
replacing o3tl/deleter.hxx with fw declaration does not work,
it compiles only when it is transitively included.
This also removes mistakenly added fw declarations and
now unnecessary IwyuFilter blacklist items
Change-Id: I2d631f0693dbfd0bb0e62218a525113042c9a907
Reviewed-on: https://gerrit.libreoffice.org/66750
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found while checking include/vcl/fontcapabilities.hxx
Change-Id: Ib598978672d08d3cae7bf6f96d1b874ca13fcb5f
Reviewed-on: https://gerrit.libreoffice.org/66254
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found while cleaning sd/source/ui/sidebar/PageMarginUtils.hxx
Change-Id: Iccbd45d9c53dd6561a6161f9949d6fb9d8539514
Reviewed-on: https://gerrit.libreoffice.org/65923
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
This does not really work: even when it seems to, it compiles only
because of transitive includes
- Filter o3tl/typed_flags_set.hxx in f-u-u
- Remove already added fw declarations from hxx files and
include full header just in case
- Remove now unnecessary blacklist entries
Change-Id: Ie0de6667af697095a623b435806449e7e28a6004
Reviewed-on: https://gerrit.libreoffice.org/64659
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Default IWYU output is sorted alphabetically by filename
A more friendly way to present f-u-i information would be
to sort by line numbers: so that a developer can go through the removal
proposals in the editor top to bottom, without too much cursor positioning
in the list of 100 header lines to delete 20 of them.
The result is not perfect, because numbers in text are not naturally sorted:
line 205 will be listed between 20 and 21; but that's a really rare occasion
Change-Id: I8011321a299a76f5a32469a9d77eb8fcc4521034
Reviewed-on: https://gerrit.libreoffice.org/63144
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ic7e6aa31e5c6d210101da7223a294092ab5b7481
Reviewed-on: https://gerrit.libreoffice.org/62334
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|