43 Commits

Author SHA1 Message Date
Stephan Bergmann
9663341f92 Bump --enable-compiler-plugins to Clang 3.8.0
<https://lists.freedesktop.org/archives/libreoffice/2017-December/079107.html>
"Clang baseline bump"

Change-Id: I18fca8794ea34118fc6308458064d0c28cf5caf7
Reviewed-on: https://gerrit.libreoffice.org/46557
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-19 22:08:38 +01:00
Stephan Bergmann
456f943d22 Fix isSalCallFunction further
...after a31267be1bb42e8a5f80a3b660bbf969eeb5b647 "Fix isSalCallFunction so it
also works on Windows", so that it actually does work on Windows.

Change-Id: I0218fb41b3e1000e2325967a18dfaafaa95fe415
Reviewed-on: https://gerrit.libreoffice.org/46193
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-10 22:50:57 +01:00
Stephan Bergmann
acb3ed0615 loplugin:includeform
Consistently use the #include "..." form for exactly those cases where the
included file is located next to the including file, see the mail thread
starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-October/078601.html>
"C[++]: Normalizing include syntax ("" vs <>)".  (For UNO API include files,
see 189abcf0db61c41a565bd355294bf6e712fc3e5a "loplugin:includeform: UNO API
include files".)

(Some of the commits done earlier with messages containing "Change done in
preparation of loplugin:includeform" etc. were based on a somewhat different
earlier version of this plugin and would not be necessary with the current form.
But they are harmless and reverting them would probably cause more noise than
benefit, so just leave them in.)

Change-Id: I9fe9268ed84d31b5df71857a2e535972b11254ce
Reviewed-on: https://gerrit.libreoffice.org/43730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-24 11:49:25 +02:00
Andrea Gelmini
26b52972a8 Fix typos
Change-Id: I9d2c641b485c32ddccf0bfaaed1d0796572d1d33
Reviewed-on: https://gerrit.libreoffice.org/39477
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-07-17 19:15:00 +02:00
Stephan Bergmann
65d6c64259 loplugin:casttovoid
Change-Id: I427b15b35ef6e7c803cb8a00c961d35175ae8cb2
2017-07-03 12:34:38 +02:00
Stephan Bergmann
8b1fcedcd1 ...and re-eanble loplugin:stringcopy again
<http://reviews.llvm.org/D22128> "Make CastExpr::getSubExprAsWritten look
through implicit temporary under CK_ConstructorConversion" was biting me again.
(I had originally developed loplugin:stringcopy against a Clang build that
includes my local fix for that issue.  I really need to see to get that resolved
upstream...)

(And while 957874168491f4b030fda85c65dd969aae82a670 "loplugin:stringcopy" was
actually a false positive, it doesn't hurt either, so just keep it.)

Change-Id: I726956adfbe67681005173cfdfed2e4b4cd6253d
2017-05-19 23:57:03 +02:00
Stephan Bergmann
bf53daa49a Clean up PPCallbacks compatiblity fix
Change-Id: I91f1db18b7876c4ecc30f7f97283e0ef0369eba5
2016-11-25 11:22:14 +01:00
Stephan Bergmann
733198de1b Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
2016-06-29 09:15:25 +02:00
Stephan Bergmann
1ce7176ba1 Remove support for Clang < 3.3
Change-Id: I185852a738bac10dc6d331afccfcbc7ae1225cb1
2016-06-29 08:55:27 +02:00
Stephan Bergmann
9308f35318 Adapt to Clang 3.4 (in preparation of a buildbot on CentOS 7)
Change-Id: Ie2859f03b31c57deb7fd0deba3285f782e33b239
2016-06-28 16:26:33 +02:00
Noel Grandin
1aafc64b4d loplugin compat with clang 3.4
Change-Id: I264fe688519b8b2173d5cccd8a453847a7fb89d9
2016-06-28 15:29:07 +02:00
Stephan Bergmann
f8a18a464e Adpat to <https://llvm.org/svn/llvm-project/cfe/trunk@273647>
"Use more ArrayRefs"

Change-Id: Ied0ab11dd9366b3f499100b2627f4919cca52c9c
2016-06-24 16:46:55 +02:00
Stephan Bergmann
cad49138da typo
Change-Id: I67721e86073bd2f67bee3ffbbb81fd5d143997d8
2016-04-21 13:52:23 +02:00
Stephan Bergmann
8d934b73cc Better fix for 13758a3d154e8e450fdfe8bcdeb6b3a03996c53a
"SourceManager::isMacroArgExpansion has only one param in older Clang", which
caused false positives like warning about sal_False in

  CPPUNIT_ASSERT_EQUAL(guard.p->m1, sal_False);

in cppu/qa/cppumaker/test_cppumaker.cxx

Change-Id: I1c5a67527aef381e336d71cb8fefbb87961bbf96
2016-04-21 12:05:48 +02:00
Miklos Vajna
4fe23a7972 compilerplugins: fix clang-3.7 build
Change-Id: I2d845d3e008cec085ce2b355c9a058363bd021cb
2016-02-29 09:37:33 +01:00
Stephan Bergmann
01f3b95884 These version checks are about the Clang the plugins are built /against/
...not the (Clang) compiler they are being built /with/.  (Also simplifies the
checking #if code.)

Change-Id: I416321be4ef4478785be40571f81500fd3b6feb8
2016-02-26 14:34:29 +01:00
Stephan Bergmann
526bbbbd2f isLookupContext already available in Clang 3.7.0
Change-Id: Ia17a116b1f7605b5a8d572c6a6f4ef64adea8f94
2015-11-19 10:12:17 +01:00
Stephan Bergmann
4a6268f0d3 Adapt compilerplugins to old Clang versions
Change-Id: I91335f1e81e251f0578792517dded9fae239fb61
2015-11-19 09:19:30 +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
Daniel Robertson
ef779d339e tdf#94389 compilerplugins: clang 3.7.0
Fix errors that occur in build with clang 3.7.0

Change-Id: I0e8743f2b6a288d10b4e78e884ce34cfca4dd77c
Reviewed-on: https://gerrit.libreoffice.org/18738
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-09-21 13:53:47 +00:00
Stephan Bergmann
1caec42837 -Werror,-Wunused-parameter
Change-Id: Iede9204bf93014e757c4fdf4a8363a90b7577dbc
2015-08-04 10:34:50 +02:00
Noel Grandin
3d5dc80b07 fix crash in refcounting plugin
introduced by commit c15b4cf39a74176cee64795129d76f411d2c0a69
"Adapt to current Clang trunk towards 3.7"

Change-Id: I00f58d3bc79e641df9bba4e9b1d5c8463b87dc42
2015-08-04 10:25:48 +02:00
Stephan Bergmann
c15b4cf39a Adapt to current Clang trunk towards 3.7
Change-Id: Ibb2c641d49a1773be789c9259f53a040db6f605f
2015-08-04 09:36:32 +02:00
Stephan Bergmann
78ad5ecd98 Clean up isMacroBodyExpansion
Change-Id: I745b320dd5f44d54371d8a0b961c49793e3e0ad6
2015-03-28 19:16:47 +01:00
Noel Grandin
c4a9241f72 new clang plugin: staticmethods
Genius suggestion from Tor Lillqvist, write a clang plugin that finds
methods that can be static.

Change-Id: Ie6684cc95d088e8750b300a028b49f763da00345
2015-03-27 10:51:08 +02:00
Noel Grandin
c7a50d072f new constantfunction loplugin
Change-Id: Ie9b7a0c41fc4dbd2560ceff6bae9ab85357f518b
2015-03-25 08:55:31 +02:00
Stephan Bergmann
193957750a Adapt compilerplugins to Clang trunk towards 3.7
Change-Id: I5b41039bf63a4c2f313fe7a57c0f6934dcb0752d
2015-02-26 17:22:01 +01:00
Tor Lillqvist
5d17e1ec85 Fix typo
Change-Id: Ifdbcbcc51c29dc14b2a3b4c845481b45300313d6
2015-01-08 12:41:26 +02:00
Stephan Bergmann
44d0e286c8 loplugin:cstylecast: improve detection of C code
Change-Id: Id5dd1ee1a29c4e1c7cb2b58419d6ccb1f032bffe
2015-01-08 10:59:39 +01:00
Stephan Bergmann
0f5756e2e4 Adapt compilerplugins to Clang trunk towards 3.6
Change-Id: If6ee343bb4d4004e7a95fe1c5adc97210fc0abd0
2014-09-23 13:46:24 +02:00
Stephan Bergmann
05ead076b4 Adapt compilerplugins to Clang trunk towards 3.6
Change-Id: Id1ce6c59f705f9c42855995e0ad590c6a3646613
2014-08-28 11:33:32 +02:00
Stephan Bergmann
4da8281d5a compat for Clang 3.2
Change-Id: I2746abd05edd00dadfe613c17b9874b1035c3be4
2014-07-02 19:19:17 +02:00
Stephan Bergmann
e5199d3d78 Flag unreferrenced functions only declared in the main file, not an include
...which appears to be a good heuristic to identify functions that are either
unused or should better be declared just once in an include file.  (It also
filters out SAL_DLLPUBLIC extern "C" function definitions, which are most likely
meant to be referenced dynamically via dlsym.)

Change-Id: I7fb78cb836b971791704851535dcfbda2b2f5bc0
2014-04-15 16:57:23 +02:00
Stephan Bergmann
b4e5b8bc1d Add compat::isInMainFile
Change-Id: I0e155c6c68a43020110a8e1c0cb29cabdcade454
2014-04-02 17:53:43 +02:00
Stephan Bergmann
26f6ff0829 More compat stuff
(currently only used by a not-yet committed plugin, though)

Change-Id: I4cff7eb97dbe10a44a911be9db090ea8cd10d8f0
2014-03-27 10:23:39 +01:00
Stephan Bergmann
f6ff4c955a More compat stuff
(currently only used by a not-yet committed plugin, though)

Change-Id: Id62ea41031ad8ba4495ef46877ad7a10bc58fb05
2014-03-14 12:20:41 +01:00
Stephan Bergmann
cc478960dc salbool: a rewriting plugin that flags most uses of sal_Bool
...that would not lead to silent changes of the code.  That is, it does not warn
about sal_Bool parameters of virtual functions, so that (not yet rewritten)
overrides do not silently become overloads instead.

The plugin is in store/ for now, because not all of the code has been cleaned up
yet.

Change-Id: I6e9b3847eb26c3090f375045188d38097052defe
2014-02-25 10:48:55 +01:00
Stephan Bergmann
6f2774b209 ...but Flags parameter was plain unsigned int prior to Clang 3.4
Change-Id: Ife39abda6b5274ae196dcbf591d02fa3f36f6072
2014-02-25 10:15:28 +01:00
Stephan Bergmann
d36e60f685 Adapt to Clang <= 3.4
Change-Id: If9c9d63d85ce29629e6453f2d69355bd64ac2fc5
2014-02-21 23:59:24 +01:00
Andrzej Hunt
b8ca3737fb DiagnosticsEngine::getCustomDiagID isn't const, so don't pass in const engine.
Change-Id: I7e4494b7f1cb62ab27851e34ab4dc6be8e04e1fa
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-01-31 16:42:08 +01:00
Jesús Corrius
82300f367d sbergman's typo
Change-Id: I36dc29659d0d6965c28e5fe0bb03759476de4781
2014-01-31 12:55:13 +01:00
Stephan Bergmann
11235e8649 clang::DiagnosticsEnginge::getCustomDiagID now needs a literal FormatString
...at least in trunk 200400 towards Clang 3.5.

Change-Id: Ibe956a7f28c16510506bd354582b3fe5a72582e5
2014-01-31 09:50:21 +01:00
Stephan Bergmann
b21e3d16aa Clang API function terminology got changed
...at least in trunk 200400 towards Clang 3.5.

Change-Id: I6e295e3a4cf721fbda9df8e7c5bed3993ee78216
2014-01-31 09:44:46 +01:00