summaryrefslogtreecommitdiff
path: root/idlc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-28loplugin:cstylecastStephan Bergmann1-1/+1
Change-Id: I7f87f24ed65c3fbc4a0a37357c7be4d16b44ac89 Reviewed-on: https://gerrit.libreoffice.org/68467 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:includeformStephan Bergmann1-1/+1
Change-Id: Id2c44c104a417feba152d4af43caca561f3432bf Reviewed-on: https://gerrit.libreoffice.org/68465 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:stringconstantStephan Bergmann1-1/+1
Change-Id: I84657379bfc999df40a17fc199bdd20b95414e32 Reviewed-on: https://gerrit.libreoffice.org/68468 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:externvarStephan Bergmann1-3/+3
Change-Id: I7f09837e76a8368fd60aed1bb3a16fd0434e11ec Reviewed-on: https://gerrit.libreoffice.org/68466 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27Untabify .l files (to silence loplugin:indentation warnings)Stephan Bergmann1-211/+211
Change-Id: I8368c8a1d52f6c55a8cea952b2b02345e41c1e5c Reviewed-on: https://gerrit.libreoffice.org/68448 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27Add missing modelines to .l filesStephan Bergmann1-0/+3
...and change connectivity/source/parse/sqlflex.l license header from using (unusual, anyway) // comments to using /* */ comment, so that it can go before Flex's opening %{ Change-Id: I371890e937cc5055405c17226dd87ba1694688aa Reviewed-on: https://gerrit.libreoffice.org/68433 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-24loplugin:unusedfields in helpcompiler..jvmfwkNoel Grandin2-22/+0
Change-Id: Ic10c521de310e0f0ac1f79a1ae169252c20075b2 Reviewed-on: https://gerrit.libreoffice.org/68226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18Simplify containers iterations in [f-l]*Arkadiy Illarionov3-37/+14
Use range-based loop or replace with STL functions Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f Reviewed-on: https://gerrit.libreoffice.org/67914 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin1-4/+4
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in helpcompiler..ioNoel Grandin3-5/+6
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620 Reviewed-on: https://gerrit.libreoffice.org/67558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-22o3tl::make_unique -> std::make_unique in i18npool...reportdesignGabor Kelemen1-2/+1
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I8bee1344f7df82536f31bc5e4ec4fd379cac1d04 Reviewed-on: https://gerrit.libreoffice.org/66704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-22idlc: no need to store single OString objects on the heapNoel Grandin4-14/+16
Change-Id: I26586ed643d34690b56e40691df9b493a34afa16 Reviewed-on: https://gerrit.libreoffice.org/65536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2-2/+2
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin1-1/+1
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin3-27/+27
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-06loplugin:collapseif in dbaccess..lotuswordproNoel Grandin1-5/+2
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin2-39/+34
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin2-7/+2
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann1-1/+1
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann3-8/+8
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-09loplugin:simplifyconstruct in helpcompiler..ioNoel Grandin2-26/+0
Change-Id: Ibdc1933b5d8d6be1fe42a7df93bd7e1c903bb39b Reviewed-on: https://gerrit.libreoffice.org/60202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-30loplugin:useuniqueptr in idlc::compileFileNoel Grandin1-5/+2
Change-Id: I9f634466a084f8565aab4843f53702500014a133 Reviewed-on: https://gerrit.libreoffice.org/59772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-30use std::vector in AstStackNoel Grandin2-55/+17
instead of a hand-coded equivalent. Note that I can't use std::unique_ptr, because the parsing code appears to just randomly leak AstScope Change-Id: Idc56dfe1f084db55c9d5a7558ac44ddab53b98e3 Reviewed-on: https://gerrit.libreoffice.org/59771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin2-4/+4
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-11set copy_paste_error to false rather than intentionalCaolán McNamara1-1/+1
Change-Id: I152482ef594c286d3c2a94cab62feff49bbf79fa Reviewed-on: https://gerrit.libreoffice.org/58884 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-27Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara1-1/+1
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 Reviewed-on: https://gerrit.libreoffice.org/58093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-10tdf#42949 Fix IWYU warnings in include/osl/*hxxGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa Reviewed-on: https://gerrit.libreoffice.org/56723 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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>