Commit Graph
228 Commits
Author SHA1 Message Date
Andrea Gelmini 8acc72d8c2 Fix typos
Change-Id: I1a3aa6e77a31e1d60bfaf98006799657f91bcb1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209890
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:30:23 +02:00
Rafał Dobrakowski 3db7176000 tdf#153109 Use std::any_of to simplify loop in sp2bv.cxx
Change-Id: Ib2fd169ba38048ba8a5e886516d91e3bbfbc3bd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203336
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2026-04-26 16:44:38 +02:00
Gabor Kelemen 953a4159ba tdf#146619 Run IWYU on cppu/ cppuhelper/ cpputools/
Change-Id: Ib3eadf94a382d9eee4fd08c1a914ea27bc75814e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189790
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-08-19 09:47:37 +02:00
Caolán McNamara 72e538b9bd tainted_data_return is deprecated
in favour of taint_source, lets drop them all first

Change-Id: I9c4e5c143fcbd6de9491360c993a8ea1b89a726e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189820
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-17 15:33:16 +02:00
Caolán McNamara c2dda4579d cid#1555171 Data race condition
Change-Id: Ibb49dbd5ce386c4e31c1dfbacb23477d1a08a5ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175069
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-17 20:25:15 +02:00
Caolán McNamara 013b832878 cid#1555171 double-locked-pattern Data race condition
Change-Id: I2ef54091535cf511a74e19a037647d5baff9a825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174971
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-15 21:05:45 +02:00
Noel Grandin d573e2ae17 loplugin:ostr in various
Change-Id: I9f399b3752da9df930e0647536ffcd4e82beb1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-20 22:09:56 +02:00
Mike Kaganski 00e2762c66 Drop uses of css::uno::Sequence::getConstArray in cppuhelper .. cui
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: Ia2b60af973183bbe79656e67b5e37d7efa39a308
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166817
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-29 23:15:40 +02:00
Stephan Bergmann 4726801b3f loplugin:external -> loplugin:conststringvar -> loplugin:redundantstatic
Change-Id: If5705fdf626ea9096e1d80b614d1907ec6b66bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159110
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08 22:49:47 +01:00
Stephan Bergmann 3afe381c84 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cpputools
Change-Id: I285ed755d35394dfb4f970dd7442ae156e3baa43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158185
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 19:31:34 +02:00
Arnaud VERSINI 7c5188cbd4 sp2bv : no need to use fprintf without any formating
Change-Id: Ieb276dcbd91873bd5121ae7534f0e120c88a88d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-14 15:01:16 +02:00
Noel Grandin 0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00
Noel Grandin 1743d74e87 clang-tidy modernize-pass-by-value in various
Change-Id: Ie091b22bd77d4e1fbff46545bc86c12f1dbafcfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138171
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 19:11:49 +02:00
Noel Grandin 5200a73627 use more string_view in various
found by examining uses of OUString::copy() for likely places

Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01 08:30:18 +02:00
Arnaud Versini 8fa40be492 cpputools : use std::mutex instead of osl::Mutex
Change-Id: I75879a0f03d8212ac9392c04fb76113cf24d510e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132300
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-01 10:07:55 +02:00
Gabor Kelemen 840b4eb2f3 Recheck modules [a-c]* with IWYU
See tdf#42949 for motivation

Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-13 08:26:15 +01:00
Julien Nabet f7a456af92 drop 'using namespace std' in cpputools
Change-Id: Ib454519ba3fb316557dc902c3ed03f9dec9d7900
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123021
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03 19:27:37 +02:00
Noel Grandin 7183b3ba23 loplugin:constmethod handle more cases
remove some of the naming limitations, and handle pointer parameters
better.

I only let the plugin run up till vcl/

Change-Id: Ice916e0157031ab531c47f10778f406b07966251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30 19:00:57 +02:00
Stephan Bergmann 77b23d1b59 Extend loplugin:stringviewparam to starts/endsWith: cpputools
Change-Id: I016ca2ecf63d62d7799db1098ba0455e337aa3eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122507
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-23 10:15:31 +02:00
Arnaud Versini 057191fb50 cpputools : no need to use fprintf for putting a string
Change-Id: Icb7f0930713d7c9fe2553913dbdc5e36617f856a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119128
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26 13:45:34 +02:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Noel c13133b613 loplugin:refcounting check for managing OWeakObject with raw pointer
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23 12:11:31 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Noel 93c64a61f2 loplugin:stringview
Add new methods "subView" to O(U)String to return substring views
of the underlying data.

Add a clang plugin to warn when replacing existing calls to copy()
would be better to use subView().

Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11 11:58:37 +01:00
Stephan Bergmann 1992978aba Upcoming improved loplugin:staticanonymous -> redundantstatic: cpputools
Change-Id: I301e5008316fcc714b7ce955f8c262a8cbed3f65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97550
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-01 07:07:26 +02:00
Noel Grandin 685c9642c1 sal_Char->char in cppcanvas..cui
Change-Id: I7e9fa7011f1e0bf143f86055718c772caebf8ee6
Reviewed-on: https://gerrit.libreoffice.org/85397
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18 17:40:23 +01:00
Stephan Bergmann f853ec317f Extend loplugin:external to warn about classes
...following up on 314f15bff0 "Extend
loplugin:external to warn about enums".

Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:

  filter/source/svg/svgexport.cxx
  sc/source/filter/excel/xelink.cxx
  sc/source/filter/excel/xilink.cxx
  svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx

All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage.  (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)

For friend declarations using elaborate type specifiers, like

  class C1 {};
  class C2 { friend class C1; };

* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")

* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".

Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace.  But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".

Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.

And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.

And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is.  GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>)  The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.

Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22 12:57:32 +01:00
Noel Grandin a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
Andrea Gelmini b14fcbba8a Fix typo
Change-Id: I1032065e6b4dd14ea9aa426375080da416abb180
Reviewed-on: https://gerrit.libreoffice.org/70993
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-20 07:53:38 +02:00
Matteo Casalin da096e3b0a Reduce OUString operations and use indexed getToken
Change-Id: I41bc361cbbbf1a446138354eb7bf80729a79bc1f
Reviewed-on: https://gerrit.libreoffice.org/65673
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28 17:10:16 +01:00
Noel Grandin e61e4e5699 clang-tidy readability-misleading-indentation
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79
Reviewed-on: https://gerrit.libreoffice.org/61935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19 07:58:15 +02:00
Stephan Bergmann 7ceee0f1ec Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense.  (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)

All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.

Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09 14:47:17 +02:00
Stephan Bergmann 206b5b2661 New loplugin:external
...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-17 09:05:38 +02:00
Gabor Kelemen dfaa7d4d28 Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from connectivity to cui

Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499
Reviewed-on: https://gerrit.libreoffice.org/57408
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-16 12:24:49 +02:00
Stephan Bergmann 1734b08356 loplugin:includeform: cpputools
Change-Id: I72982ad64a546421e8b6dd07f42c088c87d1dfcd
2017-10-23 22:46:11 +02:00
Noel Grandin 1ffba0e356 loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the
clause we want to flatten, which could lead to problematic extension of
variable lifetime

Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59
Reviewed-on: https://gerrit.libreoffice.org/42889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29 08:51:48 +02:00
Noel Grandin 2a612907ae loplugin:flatten in connectivity..desktop
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b
Reviewed-on: https://gerrit.libreoffice.org/42578
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21 15:41:50 +02:00
Noel Grandin a394d67f37 use more OUString::operator== comphelper..cui
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa
Reviewed-on: https://gerrit.libreoffice.org/39888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13 11:03:14 +02:00
Noel Grandin 146033f5da spelling instanciate -> instantiate
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81
Reviewed-on: https://gerrit.libreoffice.org/38401
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05 10:11:33 +02:00
Andrea Gelmini 7668d4e616 Fix typos
Change-Id: I56e429ff1b8ee55ccb8df16002b509770762172c
Reviewed-on: https://gerrit.libreoffice.org/35618
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:17:21 +00:00
Andrea Gelmini 0f0ebddb81 Fix typos
Change-Id: Ic54e808956e5cf4e8079942c0ff799f802cd4b6c
Reviewed-on: https://gerrit.libreoffice.org/35053
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:08:01 +00:00
Noel Grandin 198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Noel Grandin 48e83f7be2 makeAny->Any in cppuhelper..cui
Change-Id: Ia54e6e9b71df68bd04c304a0bb02da8ebac74420
Reviewed-on: https://gerrit.libreoffice.org/34603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-24 09:17:34 +00:00
Stephan Bergmann 06f1b8d46e loplugin:subtlezeroinit: cpputools
Change-Id: Ib4a04395f067a3a288a57547daa734c4c9768eb8
2017-02-21 07:35:09 +01:00
Stephan Bergmann 93732de5c1 Some simplifications, using UNO_QUERY_THROW
Change-Id: Icefafed29c9702730181f61bb03296b5b474bfa6
Reviewed-on: https://gerrit.libreoffice.org/34269
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:18:54 +00:00
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 693b00a6b2 New loplugin:dynexcspec: Add @throws documentation, cpputools
Change-Id: I7a9ac7cdc3d5e19dc63a4711a0ce2c23054367e1
2017-01-19 18:03:23 +01:00
Rohan Kumar 2e0c1e03e8 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0
and made sure that it doesn't break the build

Change-Id: I9febeed949a24d7bc5afb13dedde03fd812b5b20
Reviewed-on: https://gerrit.libreoffice.org/23077
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-11 14:01:07 +00:00
Chris Sherlock a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Stephan Bergmann 5185569e50 loplugin:nullptr (automatic rewrite)
Change-Id: I65186f574c8bbc4004eb40a95a33aea1ea3f4e96
2015-11-10 10:31:21 +01:00