757 Commits

Author SHA1 Message Date
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Stephan Bergmann
700470577f Remove junk
left over from 232c0fb700efd31eff8cfee896437c481582ed0f "#115784# idlc: fixed
commandline option processing."

Change-Id: I41f81b1223cf72c0fcf8e84cdc7016e3aebf0c9d
2017-01-25 17:59:34 +01:00
Noel Grandin
b4adb0c533 loplugin: unnecessary destructor forms..idlc
Change-Id: I765e0fa61f8134a60e5ea24452c6bbcb3fa8b054
Reviewed-on: https://gerrit.libreoffice.org/33492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 05:20:06 +00:00
Stephan Bergmann
2131bf4ebd New loplugin:dynexcspec: Add @throws documentation, idlc
Change-Id: I3c269d84906cc49d79d5f32f0dd3f15afd2f588e
2017-01-19 18:03:19 +01:00
Caolán McNamara
6abcf8b289 no special support for MACOSX PPC in master for a while now
Change-Id: I8d5dc878f41939e55ef8995d1da74548faa4711f
2017-01-17 16:19:11 +00:00
Stephan Bergmann
6e50fef4c0 New loplugin:externvar: idlc
Change-Id: I7b892efd6a5267c228c4cf17e80fac82628fbb64
2017-01-09 15:42:43 +01:00
Caolán McNamara
5c5a6c3668 bootstrap building with --disable-dynloading on standard linux
Change-Id: I5baf70f0053612cba8b74f54aff11ce25cdeb95a
Reviewed-on: https://gerrit.libreoffice.org/32202
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-20 09:31:43 +00:00
Stephan Bergmann
d4864a9440 Rewrite some (trivial) assignments inside if/while conditions: idlc
Change-Id: I6be338f54dd8e6912e48258c0a2e075dc69b2893
2016-11-29 17:20:19 +01:00
Noel Grandin
1a743fd8a2 loplugin:expandablemethods in hwpfilter..linguistic
Change-Id: I62ae20ab4a47b3b7e2b0d503cedcad3319cc9c85
Reviewed-on: https://gerrit.libreoffice.org/30683
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 08:41:38 +00:00
Noel Grandin
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
Noel Grandin
a7369d9899 loplugin:oncevar in helpcompiler..reportdesign
Change-Id: I2dc57931fb230953c285aeb18f57c0a41fedafcb
Reviewed-on: https://gerrit.libreoffice.org/30463
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 07:12:46 +00:00
Noel Grandin
877774c057 loplugin:expandablemethodds in hwpfilter..linguistic
Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5
Reviewed-on: https://gerrit.libreoffice.org/30016
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 08:07:18 +00:00
Stephan Bergmann
8b984dae44 clang-cl loplugin: idlc
Change-Id: Idcd117aa896779bb5ebdfa33c24d5e374dd943cf
Reviewed-on: https://gerrit.libreoffice.org/29861
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:18:37 +00:00
Asela Dasanayaka
4f0f1b6b55 tdf#96099 Reduce no of typedefs used for trivial containers
Removed various pinter typedefs in idlc module

Change-Id: Id850558a4550085d47a5e1122b1ce871f15956f2
Reviewed-on: https://gerrit.libreoffice.org/29754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 10:15:52 +00:00
Stephan Bergmann
f8ecdb7619 Simplify AstExpression::compare
...to only work with LONG values, as it is only used to compare enumerator
values.  (But keep its general defensive-programming air that's so prevalent
across the idlc code base; not sure whether it could rightfully be tightened, or
whether this might be needed in parser's error recovery.)

Change-Id: I15f1700834f9397f3c2e0ffdb00e2abeecb734f9
2016-10-06 16:36:26 +02:00
Caolán McNamara
dd691312a3 we shouldn't need explicit lt_rtl_OUString, etc things anymore
Change-Id: Ibeec3fcc353e07e61fb2c838b318e0a04081ce2c
2016-09-24 12:15:13 +01:00
Noel Grandin
1658bd231b loplugin:unusedenumvalues
Change-Id: I9dcc9f73af6db5b4f7cc946bc28931e5c230b34c
Reviewed-on: https://gerrit.libreoffice.org/29012
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-19 10:44:05 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin
8806a86c9d loplugin:unusedenumconstants in forms..sot
Change-Id: Ic445e1bdd012c32ef7d84aec9df908467c3296a7
Reviewed-on: https://gerrit.libreoffice.org/28055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-12 06:53:29 +00:00
Noel Grandin
602647c241 loplugin:unnecessaryvirtual
Change-Id: If25d9307efda5f57b0f80a0cf5c2c5cab6a752d6
Reviewed-on: https://gerrit.libreoffice.org/27981
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-08 13:06:58 +00:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Tor Lillqvist
e0849330bc Get rid of unnecessary directory levels $D/inc/$D
Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48
Reviewed-on: https://gerrit.libreoffice.org/25532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-05-27 17:10:45 +00:00
Andrea Gelmini
e02d087147 Fix typo in code
Change-Id: I71ede9bf7d3f7de236dd161f30b36f52efec2c56
Reviewed-on: https://gerrit.libreoffice.org/25185
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-05-20 07:25:28 +00:00
Stephan Bergmann
2188f877ed Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: I07f247f003a5522e7d655f30f7c68d1b8f7225f2
2016-05-10 17:02:15 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
d36b8733c0 loplugin:nullptr
Change-Id: Id58f3320ff152286fa6b3268cdc9c2af2d7e068b
2016-04-26 17:49:10 +02:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Noel Grandin
2087484c65 use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

In this stage we focus on replacing usage of the WIN macro

Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17 11:33:57 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Noel Grandin
4ff5a55584 loplugin:unusedmethods
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e
Reviewed-on: https://gerrit.libreoffice.org/21603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20 08:13:51 +00:00
Noel Grandin
e3a31fcca7 loplugin:unusedfields
Change-Id: I979592adb978c3757a1e54615021ee424a2e02bf
Reviewed-on: https://gerrit.libreoffice.org/20892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-24 07:28:28 +00:00
Stephan Bergmann
0555447cd0 FD_complex is unused
...since 8e71d9400bd350d63723c5489ddaadb3d3610baf "Remove UNOIDL 'array' and
'union' vaporware from idlc"

Change-Id: Id4cdef900667cdac466a41e47c189e2d25a62065
2015-11-30 14:55:35 +01:00
Noel Grandin
2e1d74dc4f loplugin:unusedfields idl,idlc
Change-Id: I39816fc613aadb5250eed39fd0c6830abe1cde2c
2015-11-20 15:07:05 +02:00
Stephan Bergmann
a96b564aee loplugin:nullptr (automatic rewrite)
Change-Id: Ic42387288c96436915956ede2eb510b9c3fbc49b
2015-11-10 10:31:29 +01:00
Stephan Bergmann
d22a052d12 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I106ec424d4a2b32b91d9c4c70eb8a6670c20ede9
2015-11-06 09:36:22 +01:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
f72ebcbe43 clang-analyzer-deadcode.DeadStores
Change-Id: I9c409cb2d7898ac6f395618cd950385cf036b002
2015-10-07 12:49:43 +02:00
Noel Grandin
58aea3f36c loplugin:unusedmethods
- improvements to the plugin to find more method calls
- improvements to python script to remove more false+
- fix the FORCE_COMPILE_ALL build flag to include code in
  the $WORKDIR

Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836
Reviewed-on: https://gerrit.libreoffice.org/19064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 10:43:24 +00:00
Stephan Bergmann
a5bb6eff86 Return unique_ptr from AstExpression::eval_* functions
...generally, idlc leaks most memory, and e.g. trying to turn
AstExpression::m_exprValue into a unique_ptr would fail because
AstExpression::eval_symbol returns a pointer to an object "owned" elsewhere (but
never actually deleted by its owner).  So improvement of idlc ends here---for
one, it does not improve anything to try and make idlc not leak memory, and for
another, idlc is doomed to go away anyway.

Change-Id: I36f54130c8bfd1933126ae7f8a982e50d9bc616e
2015-09-28 08:12:15 +02:00
Stephan Bergmann
1f8723bf91 m_exprValue cannot be non-null here
...as, like the other private AstExpression::eval_* functions, eval_un_op is
only called from AstExpression::evaluate if m_exprValue is null

Change-Id: I812ea249d33a72f95b9692dc72ba6631ffbd4884
2015-09-28 08:12:14 +02:00
Stephan Bergmann
84001596c9 AstExpression::coerce always returned m_exprValue, so simplify its signature
Change-Id: I4fa380bc7e8d5b3581468cb0e6417b99587a1e9f
2015-09-28 08:12:14 +02:00
Stephan Bergmann
b085d55e55 Remove redundant AstExpression::eval_internal
Change-Id: I27c067adb2b09ad65a8449f2d88a9cdde149d4be
2015-09-28 08:12:14 +02:00
Stephan Bergmann
cb31ea6981 AstExpression::eval_internal always returns m_exprValue
Change-Id: I214fb3d14cef07357860a88fae1652a7d1a282b0
2015-09-28 08:12:13 +02:00
Stephan Bergmann
6b3feb91b8 AstExpression::coerce is always called with bAssign = true
Change-Id: I883b8319fde0bd3cc65efe64eb2faf53e2344cfc
2015-09-28 08:12:13 +02:00
Stephan Bergmann
2b19fd8570 Simplify coerce_value signature
Change-Id: I0791600a5cc8600ea80233afba07724dd7f565e1
2015-09-28 08:12:13 +02:00
Stephan Bergmann
bc1fdb79b0 The only EvalKind actually used is EK_const
Change-Id: Ide451d1e287eeb8666b9ddcce312b9a753761c50
2015-09-26 21:54:07 +02:00
Michael Weghorn
25accda781 tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad
Reviewed-on: https://gerrit.libreoffice.org/17920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-22 13:02:08 +00:00
Noel Grandin
403c13487c loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 09:39:22 +00:00
Noel Grandin
a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
Andrea Gelmini
420923ba76 Fix typos
Change-Id: Ie2bbe020fc6e3a4a4f913208c245f395849bb9ee
Reviewed-on: https://gerrit.libreoffice.org/16708
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-07-03 09:32:26 +00:00