summaryrefslogtreecommitdiff
path: root/idlc
AgeCommit message (Collapse)AuthorFilesLines
2018-04-06fflush() followed by fclose() is redundantTakeshi Abe1-2/+1
Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c Reviewed-on: https://gerrit.libreoffice.org/52420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-23loplugin:useuniqueptr in AstStructNoel Grandin2-8/+4
Change-Id: Ib7416235e41192323e74061bfce6c162e87612f2 Reviewed-on: https://gerrit.libreoffice.org/51736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-18Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet9-118/+67
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-05Make LibreOffice buildable on Haiku.Kacper Kasper1-1/+1
* Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-01idlc: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski3-7/+1
Change-Id: I0fbba0c1b12f9ade703ceee477dae4056fe9d31e Reviewed-on: https://gerrit.libreoffice.org/48994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-19loplugin:unusedmethods also check for functions returning boolNoel Grandin4-8/+4
we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann2-5/+5
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-17fix use of std::unique_ptr in IdlcNoel Grandin2-15/+13
I removed the deletes in the destructor in commit b27fee9e0ebb445ce82baeade3b249807dca392b Date: Wed Jan 10 11:44:28 2018 +0200 loplugin:useuniqueptr cppu,idlc,io,ucbhelper but forgot to do the actual conversion Change-Id: Icb03070e1d8a2b10ccf892f01e9b44cc6bf0156f
2018-01-17loplugin:unnecessaryparen extend to delete statementsNoel Grandin1-1/+1
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1 Reviewed-on: https://gerrit.libreoffice.org/48027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-13loplugin:useuniqueptr in idlcNoel Grandin3-15/+4
Change-Id: Iccc50462ca115546422824b6814abf16a029f005 Reviewed-on: https://gerrit.libreoffice.org/47793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: idlcStephan Bergmann5-85/+85
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I1cb9e69b8138cb5bb63f18231018f166b67b3072
2018-01-11Manual loplugin:cstylecast fixes in idlc/source/parser.yStephan Bergmann1-2/+2
...with a to-be-committed improved loplugin:cstylecast Change-Id: Iafd2f3d401e7a9e46acfdba89a5b35498afbfd3c Reviewed-on: https://gerrit.libreoffice.org/47753 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-11loplugin:useuniqueptr cppu,idlc,io,ucbhelperNoel Grandin3-6/+4
Change-Id: I6d8c24fabd52b39c66ce0b88b547df7ec85dad76 Reviewed-on: https://gerrit.libreoffice.org/47725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin5-12/+12
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin1-1/+1
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann1-1/+1
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02improve constparam lopluginNoel Grandin2-2/+2
lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: idlcStephan Bergmann34-59/+59
Change-Id: Ia32beed408de33fbe8ed59ddcab5b01ddc3b8218
2017-10-23loplugin:constmethod in cppu,cppuhelper,idlcNoel Grandin13-33/+33
Change-Id: I9138b7e5d53c30488f99e9f9b9fe3f98c8d6858b Reviewed-on: https://gerrit.libreoffice.org/43583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-3/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-20Silence compiler warnings C4005 (redefined INT8_MIN etc.)Mike Kaganski1-0/+9
Change-Id: I29feefb1045e22addcbe68c00e3ed601e258519d Reviewed-on: https://gerrit.libreoffice.org/43607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-19loplugin:includeform: manual changes to idlc/source/parser.yStephan Bergmann1-2/+2
Change-Id: I1f3b08b4af08956aefad12c679cccf7bd5112f8c Reviewed-on: https://gerrit.libreoffice.org/43557 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski1-3/+4
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-01Prefer prefix operatorJulien Nabet1-13/+13
Change-Id: I82f3f66bfc675dbc4a5d5b57d8715c3de01d9620 Reviewed-on: https://gerrit.libreoffice.org/42994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski1-1/+1
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski1-15/+3
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-11clang-tidy modernize-use-emplace in hwpfilter..lotuswordproNoel Grandin3-8/+7
Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70 Reviewed-on: https://gerrit.libreoffice.org/42156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-1/+1
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin1-13/+7
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-06loplugin:constparams in sw part6Noel Grandin3-5/+5
Change-Id: Ic82946cf9be50d9d9c43338b86dfb700ce5b354c Reviewed-on: https://gerrit.libreoffice.org/40786 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18no copy neededJochen Nitschke1-52/+2
coerce_value(..) is a local static function without side effects Change-Id: Id153ad26973b5724b33f144ae9eba49562b15067 Reviewed-on: https://gerrit.libreoffice.org/40040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-07-18loplugin:constparams codemaker,idl,idlcNoel Grandin7-12/+12
Change-Id: Ic72b7525cfbfbd3c5afb12fe9ea814176e6c8c9d Reviewed-on: https://gerrit.libreoffice.org/40126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin2-2/+2
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-16Fix lifecycle issueStephan Bergmann2-4/+6
...as shown by ASan/UBSan build use-after-free report at <https://ci.libreoffice.org/job/lo_ubsan/602/> after 8e39ef66928a3e37c618d3a70a631e71266db274 "extend loplugin useuniqueptr to POD types" Change-Id: Ic42e408c2c4b2901cdf5d681b332543ec8f445ef
2017-07-14extend loplugin useuniqueptr to POD typesNoel Grandin2-13/+13
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:unnecessaryparenStephan Bergmann1-3/+3
Change-Id: I37833e0e19162790f4ae37d74eb63cb84434cf2e
2017-06-25loplugin:oncevar in helpcompiler..jvmfwkNoel Grandin2-4/+3
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in forms..idlcNoel Grandin2-4/+0
Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822 Reviewed-on: https://gerrit.libreoffice.org/39133 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09More tests to suppress (all .PHONY test targets should be covered now)Stephan Bergmann1-0/+4
Change-Id: Ib948547e5c177ac62506fc42a564368a8d31fa4e
2017-05-29remove some unnecessary OString constructor callsNoel Grandin1-12/+12
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin3-8/+6
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09remove unnecessary empty OUString fields and varsNoel Grandin4-24/+18
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast check for c-style casts to voidNoel Grandin1-1/+1
Change-Id: Ic8b99f590436f94825e471bc61411c69fd768862 Reviewed-on: https://gerrit.libreoffice.org/36208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin1-1/+1
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I389542e18fcf71011f22919743b5280779f449fd Reviewed-on: https://gerrit.libreoffice.org/35632 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23Remove unused #include <ctype.h>Stephan Bergmann1-1/+0
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-22Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)Stephan Bergmann1-1/+3
Change-Id: I9d3cf6363e1caf66a9d4cc3a1560c93e17038c2d
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-1/+1
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-21Idlc::m_pErrorHandler is unusedStephan Bergmann2-3/+0
Change-Id: I41fea5e08381e21dff12f61142a4d54f07a502f4