# language-related config variables for LibreOffice # this file is intended to be able to be included in a Makefile # and not to be sourced in a shell session # ALL_LANGS=@ALL_LANGS@ WITH_LANG=@WITH_LANG@ WITH_LANG_LIST=@WITH_LANG_LIST@ WITH_POOR_HELP_LOCALIZATIONS=@WITH_POOR_HELP_LOCALIZATIONS@ y'/>
summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/store
AgeCommit message (Collapse)Author
2019-10-07do not use compiler.getSourceManager().getFilename()Luboš Luňák
This is a continuation of ff002524c12471668e63837a804b6006f9136a34. When compiling with icecream, its -frewrite-includes merges all #include's into one .cxx file and marks them with with line markers. But SourceManager::getFilename() doesn't take those into account and so it reports all of those as <stdin>. So use getFileNameOfSpellingLoc(), which explicitly handles this case. And we should probably never ever use SourceManager::getFilename(). Change-Id: Ia194c2e041578e1e199aee2df2f885922ef7e31a Reviewed-on: https://gerrit.libreoffice.org/80379 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-08-23filter out AST in more pluginsNoel Grandin
I seem to have missed quite a few in commit 9f4d23c15115d64febd6bf01f870cc157badd350 filter out some of the AST in the plugins This nets me another 14% improvement Change-Id: I39b980b49ced560f768045dbedd3ddfef29306c1 Reviewed-on: https://gerrit.libreoffice.org/59501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-18new loplugin intvsfloatNoel Grandin
This was a good idea from mike kaganski as a consequence of https://gerrit.libreoffice.org/55359 Unfortunately, clang/llvm is not yet up to the job of doing floating point evaluation, I get tons of crashes all over the evaluate infrastruction inside clang, so this will need to wait until clang's code matures. So park it in store for now Change-Id: I5ba4de8323e462b4fd4db301e4d116a81fd56ed3 Reviewed-on: https://gerrit.libreoffice.org/59254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14filter out some of the AST in the pluginsNoel Grandin
by checking if the current namespace decl is in our code, so we have to scan less stuff, which results in a 10% perf improvement for me Change-Id: Idf0e30d57b6d0dcd13daa9ed679c28b9d233d387 Reviewed-on: https://gerrit.libreoffice.org/58942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03Adapt compilerplugins/clang/store/deletedspecial.cxxStephan Bergmann
...to 322083e0cf1268bc5d40f0d49eb50f00f503ef15 "ScFormEditData copy functions can be deleted" Change-Id: Ic62c83b79e70a79d1d236b79140009a4212b6a43 Reviewed-on: https://gerrit.libreoffice.org/56878 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-18Replace SVGFilter using SVGIOArmin Le Grand
Target of this change is to get rid of the SVGFilter in current LO which is based on the standard-ODF importer using it's functionality by passing in/handing over temporary created XML-Stream-Data. First step is to alternatively import the given SVG file to a newly created Document and to strip the existing Filter-Code. Adding the first prototype of the changed import. It is capable of importing the given SVG to the created Draw/Impress document. It adds the SVG which gets imported by SVGIO as GraphicObject. It adapts sizes and positions of Page and GraphicObject to have a smooth import. Adding stripping of SVGFilter and used ressources. Done as deep as possible, hopefully all places found. Adapted now to create an Impress document. Also added needed adaptions to PageSize(s), including layout and PresObj stuff to make all MasterPages/LayoutPages work correctly. Added reaction on empty SVG. This is needed since the PageSize is adapted to the Graphic. With empty Graphic a Size(0,0) results and this goes wrong. Change-Id: Ia364a5783bee7dadcbe91e700efbabc121cf98f9 Reviewed-on: https://gerrit.libreoffice.org/54096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-03-11weld color pickerCaolán McNamara
Change-Id: I487b9a0cc13b2b60a0f1e28667773b5d3b5c66cc Reviewed-on: https://gerrit.libreoffice.org/51001 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-19Remove now unused libgetuid.somichael.weghorn
Some scripts in which it was used have been removed (commit e1082e45361a92a31adedcc3ed0a35c704bca543) and the more reliable 'fakeroot' is now in use at all other places where libgetuid.so was previously used (s. tdf#115554). Change-Id: I638e96e5c8d671e3b145b79f33de718fe34ea514 Reviewed-on: https://gerrit.libreoffice.org/49837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-19Bump --enable-compiler-plugins to Clang 3.8.0Stephan Bergmann
<https://lists.freedesktop.org/archives/libreoffice/2017-December/079107.html> "Clang baseline bump" Change-Id: I18fca8794ea34118fc6308458064d0c28cf5caf7 Reviewed-on: https://gerrit.libreoffice.org/46557 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-19remove unused typedefsNoel Grandin
Change-Id: I6fd7a9fed3a80c91a3766fceefd43c5db0aa5275 Reviewed-on: https://gerrit.libreoffice.org/46763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30Move loplugin:fpcomparison to store/Stephan Bergmann
...after bc4e8de8eea1ccebda479c8e2db2f3c6dfff60d2 "Silence new loplugin:fpcomparison for now": > Nov 30 08:33:16 <sberg> noelgrandin, thoughts on whether fpcomparison is actually worth it, seeing the loooooooong blacklist there? > Nov 30 08:34:11 <noelgrandin> sberg, that's wasn't my idea, can't remember who came up with it. vmiklos was that you? > Nov 30 08:34:36 <noelgrandin> sberg, the original commit message was "Find code that compares floating point values with == or != > Nov 30 08:34:36 <noelgrandin> It should rather use rtl::math::approxEqual" > Nov 30 08:34:45 <noelgrandin> so in theory the replacement should be fairly manual > Nov 30 08:34:48 <vmiklos> i don't think so :) > Nov 30 08:35:15 <noelgrandin> might have been moggi, but he's not around so.... just disable it > Nov 30 08:36:19 <sberg> noelgrandin, yeah, in theory; in practice, I guess there's also cases where x==1.0 is what you want exactly (given x tends not to be a computed value after all, but some literal that's being passed around) > Nov 30 08:36:33 <sberg> noelgrandin, yeah, I'll disable it then Change-Id: I35f5328efa0ec02d9be837c12efab2b03a3dae52 Reviewed-on: https://gerrit.libreoffice.org/45550 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-30new loplugin: constmethodNoel Grandin
parked in store/ for now, because, as I worked my way up the layers of modules, the higher I got, the more false+ I got when trying to only make changes that preserved logical-constness. Change-Id: I4acd2c4416775f7c6a3d91eb0bce048630ccaff5
2017-10-18loplugin:manualrefcountNoel Grandin
this is the code I used to find naked acquire/release stuff No need to run it all the time, so leave it in store Change-Id: I9ac4a6f5db7cd4cbb1b63698340425eed7cb8713
2017-10-09Move loplugin:bodynotinblock to store/, to improve performanceStephan Bergmann
...as it was the last remaining enabled-by-default plugin that calls expensive parentStmt. It isn't immediately clear to me how to rewrite the plugin to not call that, but a superset of this plugin's warnings are now also emitted by GCC 6 -Wmisleading-indentation. Change-Id: Ifa55cb14f6763594fe48926585df29d4d30355df
2017-09-25Fix typosAndrea Gelmini
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-16move deadclass plugin to storeNoel Grandin
<sberg> noelgrandin, and is loplugin:deadclass even sound? struct B { B(B const &) {} }; struct D: B { D(): B(*this) {} }; Change-Id: Idadd379b925aa6f9de6c625bffa8560ec4192ac7
2017-06-26update constantfunction lopluginNoel Grandin
didn't find anything useful, so just updating the exclusion lists Change-Id: I66d37aee185290f454e5ac0baeafd1f67bfaf106 Reviewed-on: https://gerrit.libreoffice.org/39254 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20improve oncevar lopluginNoel Grandin
we look for any kind of scalar variable now that deserves to be inlined, and we check for variables that cannot be inlined because they are being passed by reference, or modified, or have their address taken Change-Id: Ia744a180e91d1516140a1555d4514f6fa4de1c0b Reviewed-on: https://gerrit.libreoffice.org/38966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-05sc: Remove some dead slotsMaxim Monastirsky
Change-Id: I92cfd5043c084d64fdfba3a1df817ee035388797
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-28fixes for some lopluginsNoel Grandin
ran the ones in store/ just for fun, but didn't find anything useful Change-Id: I2bb251e8d99b5d88e11b2ca74e99672d75f0a1fd
2017-02-01loplugin: use TypeCheck instead of getQualifiedNameAsStringNoel Grandin
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-12-22Generalize vector/deque ctor checks to work with MSVCRTStephan Bergmann
Change-Id: I2d493a36b8c2e3abe69964c04b46f08d67ef8a48
2016-11-08loplugin:oncevarNoel Grandin
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d Reviewed-on: https://gerrit.libreoffice.org/30668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>