Noel Grandin
db17d3c17c
new loplugin: memoryvar
...
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr
Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 07:16:20 +00:00
Stephan Bergmann
986c495052
Missing isInLokIncludeFile check
...
Change-Id: I6577987f3f3717337e6607ffbe38397f229978f0
2015-11-10 11:26:03 +01:00
Stephan Bergmann
1cd6e2e08e
Keep LibreOfficeKit.hxx compatible with C++03
...
Change-Id: Ic2f123c9b341dbb421b766c3bba1fc56c1bfb41d
2015-11-10 11:08:30 +01:00
Noel Grandin
6c80a8fe89
new loplugin: oncevar
...
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Michael Stahl
10afa00c8c
compilerplugins: enhance "badstatics" plugin to find members
...
Finds static variables of types that have bad non-static members.
Change-Id: I81ee940580c0f043feb543840ea4d3dd27734202
2015-11-06 20:37:38 +01:00
Michael Stahl
22fb58a6fa
compilerplugins: getAsTagDecl doesn't exist in clang 3.5
...
Change-Id: If7277820227486e2eb578a167e0fd9f05c8f74ae
Reviewed-on: https://gerrit.libreoffice.org/19823
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-06 19:38:13 +00:00
Stephan Bergmann
938f670928
loplugin:stringconstant: elide explicit ctor usage
...
Change-Id: I962db9583ef9cada42a61b6a95eeea818fceeead
2015-11-06 12:33:41 +01:00
Noel Grandin
609b227873
fix tdf#95488, crash in report wizard
...
This reverts commit bb76b8f10697f3d5ca1f9a2f19902b043bd61cd7
"loplugin:mergeclasses"
Change-Id: Ib65459ab45cd4cefa859ed75f9ddc4f070879b1d
2015-11-05 12:02:00 +02:00
Stephan Bergmann
b16a337231
Improve warning messages
...
Change-Id: I75eb9f17a3dcc688314355fa957e3f34086b161a
2015-11-05 09:30:42 +01:00
Stephan Bergmann
1a6044dd8a
Do not implicitly run this for now; it breaks the build
...
Change-Id: I84679c4ca395f934bca8f92f0587f6cf16cfa5e6
2015-11-05 08:07:48 +01:00
Bjoern Michaelsen
2e5be58e7c
complete initial compiler plugin for the ServiceDocumenter
...
- this creates a set of static html-meta-redirect-pages linking the UNO
implementation name to its C++ class, while doing a clang compile from
scratch
- the output is written to $(WORKDIR)/ServiceImplementations
- still quite some corner cases missing, e.g:
- anonymous namespaces
- non-trivial getImplementationName() functions
Change-Id: I19a0e8a3901277dc3811eb428cac9d00737f14a9
2015-11-05 00:15:52 +01:00
Stephan Bergmann
0305078a6a
skeleton implementation for ServiceDocumenter compiler plugin
...
Change-Id: I6a9c957c0c4dac16365d269e57c30210619d23c9
2015-11-05 00:15:48 +01:00
Noel Grandin
59b072e22b
yyyyy
...
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Benjamin Ni
be729e7721
tdf#94269: Replace "n" prefix for bool variables with "b"
...
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
Michael Stahl
bf18f1b353
compilerplugins: add "badstatics" to detect abuse of VCL Bitmaps
...
VCL Image/Bitmap/BitmapEx instances must not have static life-time
because then they will be destructed after DeInitVCL() and that
likely segfaults.
Change-Id: I3ff8d32de729c971b190028094cb4efe206395e2
2015-11-02 16:39:19 +01:00
Michael Stahl
048d47d54d
compilerplugins: check that we're not building ccache preprocessed
...
... input, which breaks because a) isInUnoIncludeFile() will not
recognize the paths (which is actually fixable if it used
getPresumedLoc() to get the path), and b) the isMacroBodyExpansion()
check in salbool.cxx (which doesn't look fixable).
So instead of printing lots of spurious warnings just abort.
Change-Id: I77fd77b4986d2b099453309ecdf31be9cf93ceec
Reviewed-on: https://gerrit.libreoffice.org/19693
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-10-30 16:31:13 +00:00
Michael Stahl
7ef698a47b
compilerplugins: fix warning message copy-pasta
...
Change-Id: I3b845ae46b0d0b14be90382727cc02a838a0392e
2015-10-30 16:09:37 +01:00
Noel Grandin
644487a115
loplugin:unusedmethods
...
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27 08:20:43 +00:00
Noel Grandin
3ce9af420a
loplugin:unusedmethods
...
Change-Id: I73180266c0af98dbd8d29bd3b11850996b94def9
Reviewed-on: https://gerrit.libreoffice.org/19195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-27 02:33:18 +00:00
Serge Krot
0b018d202d
tdf#39440: fix several warnings reported by cppcheck
...
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae
Reviewed-on: https://gerrit.libreoffice.org/19587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-25 22:31:44 +00:00
Noel Grandin
382eb1a23c
remove untyped Link<>
...
Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b
Reviewed-on: https://gerrit.libreoffice.org/19491
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-21 07:44:43 +00:00
Andrzej Hunt
7276c34667
Ignore the default constructor for loplugin:badvectorinit too
...
The default constructor doesn't necessarily have 0 parameters,
hence we need to explicitly test for this too.
Change-Id: I685c44ab373ec8234a86824a77cc523a355c8b05
Reviewed-on: https://gerrit.libreoffice.org/19496
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-21 06:54:08 +00:00
Stephan Bergmann
931c51f65b
Make loplugin:defaultparams handle enum values and nullptrs
...
Change-Id: I0c57b414d9230406cf2632494ccfa576510b0e61
2015-10-20 14:39:48 +02:00
Noel Grandin
56e6f0da83
new loplugin: badvectorinit
...
look for places calling the 1-argument vector fill constructor and then
immediately called push_back, which is generally a sign that its
leaving empty slots.
Change-Id: I34e69b8d09cc48c0d409499faaf192b9f86bc517
Reviewed-on: https://gerrit.libreoffice.org/17525
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-10-20 11:35:31 +00:00
Stephan Bergmann
7ba3711606
Remove accidentally committed debug code
...
Change-Id: Iba6b97d1a4a0988a3b0404bd14097f92a500d8ae
2015-10-20 11:43:58 +02:00
Stephan Bergmann
415d43473e
Make loplugin:defaultparams work for multiple default params per function
...
Change-Id: I0aa3841e1ac3375f519384f3012450bc683d1c51
2015-10-20 08:43:18 +02:00
Noel Grandin
ec20e65469
loplugin:mergeclasses, merge IControlContext with OBrowserListBox
...
Change-Id: Ib3e54c9fe8d9445ad799e4b06c41443093af87fb
2015-10-13 10:07:50 +02:00
Noel Grandin
38b4b7590d
loplugin:mergeclasses, merge OOdbcLibWrapper with OOdbcEnumeration
...
Change-Id: I2e564e90c11bb46022a5e258ad013aeb2fe4ca2e
2015-10-13 10:07:50 +02:00
Noel Grandin
ade2ba503f
loplugin:mergeclasses, merge ILabelProvider with LabelProvider
...
Change-Id: I8fb231b4189c09d8e049855d38b0f1eb518ac2b9
2015-10-13 10:07:50 +02:00
Noel Grandin
3e5f9c0343
loplugin:mergeclasses, merge IImageProvider with ImageProvider
...
Change-Id: I6af8b1ab9198439af60e38a9adc6bdd29d20ab52
2015-10-13 10:07:49 +02:00
Noel Grandin
9abb98e019
loplugin:mergeclass, merge CompareLine with SwCompareLine
...
Change-Id: Id423939377e6ebb0881a9a7361d6baedbf87931c
2015-10-13 10:07:49 +02: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
bff4c13475
Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
...
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Noel Grandin
e1d7a84955
loplugin:mergeclasses
...
Change-Id: I935c6144a7731091e7fdb0a818b54f30d3304f2e
2015-10-12 09:13:34 +02:00
Noel Grandin
8d811d701f
loplugin:mergeclasses
...
Change-Id: I672d277a8d2dc6b57b299679e7e98348f9dbde30
2015-10-12 09:13:34 +02:00
Noel Grandin
1d8806120f
loplugin:mergeclasses
...
Change-Id: I31fe981dac14bd732ee68ee1a2e475dd1b0498a2
2015-10-12 09:13:34 +02:00
Noel Grandin
6b34ac2419
loplugin:mergeclasses
...
Change-Id: Ic02d59708670949c3342566753882eebd086438f
2015-10-12 09:13:34 +02:00
Noel Grandin
06e4a98990
loplugin:mergeclasses
...
Change-Id: I6266369912413d51c9f1595b13dca97d3d74225f
2015-10-12 09:13:34 +02:00
Noel Grandin
f8ba308cd7
loplugin:mergeclasses
...
Change-Id: Id6e39c2c20ab3da5a8b8628f99a940b896feff78
2015-10-12 09:13:33 +02:00
Noel Grandin
523eaf4888
loplugin:mergeclasses
...
Change-Id: Ia4c09c5b835e77eaa2d4c0d8c74f146feb0905be
2015-10-12 09:13:33 +02:00
Noel Grandin
48532dfa60
loplugin:mergeclasses
...
Change-Id: I1ce2e31e4dae780612e51b3806ee6044be9cf4bb
2015-10-12 09:13:33 +02:00
Noel Grandin
529f15859b
loplugin:mergeclasses
...
Change-Id: I660b102e0e053e632ea6f1880e92652bc1ed5e5e
2015-10-12 09:13:33 +02:00
Noel Grandin
0f88736128
loplugin:mergeclasses
...
Change-Id: Icd01de71fe87e0bf17eba39f5b00fc9a46765509
2015-10-12 09:13:33 +02:00
Noel Grandin
3e6ff89b5c
loplugin:mergeclasses
...
Change-Id: Ia4ae4f17fba9775fc53618ab1662c10e37ee4be3
2015-10-12 09:13:33 +02:00
Noel Grandin
14421f20dc
improve the mergeclasses loplugin
...
Change-Id: Icbb873c4ac15ef146b126b97f45eabdc53cd4c1a
2015-10-12 09:13:32 +02:00
Noel Grandin
527a9a1146
loplugin:mergeclasses
...
Change-Id: I555e3db911a97e798ce9f10c76d7fe187ea550a7
2015-10-12 09:13:32 +02:00
Caolán McNamara
71bb6d6b72
Revert "loplugin:mergeclasses" to fix mac build
...
because fontsubst.cxx is not built on mac.
move PreMatchFontSubstitution to PhysicalFontCollection.cxx ?
This reverts commit 349700228e4449ace956b30bc65208b9196f0a78.
Change-Id: I007f24313ddfd0eb3db3fd599abcf1eae3da4e9c
2015-10-07 12:57:44 +01:00
Noel Grandin
bb76b8f106
loplugin:mergeclasses
...
Change-Id: I8f5c2ae658f8784233db98f752b6f9fa53110195
2015-10-07 12:32:23 +02:00
Noel Grandin
5dbbb498b5
loplugin:mergeclasses
...
Change-Id: I0ac98a6fafb48b2be00973ae9fd34f4bc756cd7f
2015-10-07 12:32:23 +02:00
Noel Grandin
a3eacae95a
loplugin:mergeclasses
...
Change-Id: Icf1731dfbd16d85decd2aaf80be4841ac37007fd
2015-10-07 12:32:23 +02:00