summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2014-10-01Remove excess [%1 %2] that doesn't match any argumentsStephan Bergmann1-1/+1
...and is apparently a leftover from temporary debug output in e36badb98d0bb5866a297cb51c3e95cdce62d8da "Fix workaround for bug in Clang 3.2 FunctionDecl::isInlined." Change-Id: I3213981c5d236a7b67083014692566f75a2bcd51
2014-09-30compilerplugins: get rid of std::auto_ptr in commentStephan Bergmann1-1/+1
Change-Id: Ia2b1bc97f3476da7bfbe659e5160cd5c73c01ce5
2014-09-29cstylecast plugin: ignore templates, improve messageNoel Grandin1-2/+8
Change-Id: I8347010d5607dc2cbb113b33f1cb2cc78ec106d2
2014-09-25loplugin:nullptrStephan Bergmann1-0/+211
A plugin to warn about and rewrite null pointer constants that are not written as nullptr (in C++11 code) resp. NULL (in C and C++03 code). It is not activated for the following reasons: * At least the call to pImpl->aFmtNms.insert(pImpl->aFmtNms.begin() + nPos, nullptr); in svx/source/items/clipfmtitem.cxx would require <https://svn.boost.org/trac/boost/ticket/10540> "missing std::nullptr_t support in boost/type_traits/is_pointer.hpp" to be fixed first. * Additions of code that violate the plugin would probably be frequent, causing unnecessary grief for those building with plugins enabled. * It did not find anything interesting, apart from the above Boost bug and the mildly interesting 1da153b617b80887680be65c1854ef8080c2e1c9 "Consistently use APP_WRITER as an integer, never as a nullptr." Anyway, until make -O -j4 -k check; do make -O -j1 -k check \ COMPILER_PLUGIN_TOOL=nullptr UPDATE_FILES=all; done sucessfully executed on a recent master and resulted in 6798 files changed, 60919 insertions(+), 60919 deletions(-) Change-Id: I1260227949868e73fcb63fda13d83e79fde685d7
2014-09-23Adapt compilerplugins to Clang trunk towards 3.6Stephan Bergmann2-1/+14
Change-Id: If6ee343bb4d4004e7a95fe1c5adc97210fc0abd0
2014-09-23fdo#82577: Handle WindowNoel Grandin1-1/+1
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-21Revert "new loplugin: VCL widget reference checker"Stephan Bergmann1-86/+0
This gerrit patch was apparently not ready yet for integration. This reverts commit 44a432e9073b3d39b1bdd34b65cfd91d5541f324.
2014-09-21new loplugin: VCL widget reference checkerNoel Grandin1-0/+86
First stage of new VCL widget reference checker Change-Id: I63a2108a26b3c0e0a896d13672b1daa6f8e60b3a Reviewed-on: https://gerrit.libreoffice.org/10427 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-09-16...and anotherStephan Bergmann1-1/+1
Change-Id: If9d85236177c819c159d1b836e806fc2b03da45c
2014-09-16Fix workaround for bug in Clang 3.2 FunctionDecl::isInlinedStephan Bergmann1-14/+17
Change-Id: I9b0b6affc60ae030b644fdd13eecfb1aed1f472a
2014-09-15Work around bug in Clang 3.2 FunctionDecl::isInlinedStephan Bergmann1-1/+12
Change-Id: I214a9745f27c27868b3e74785cf7138fc1db1943
2014-09-15do not warn about "null pointer conversions" from integers in C++98 modeLuboš Luňák1-10/+6
Change-Id: I15c7f52c542549ad131400c9b5395a06a4777687
2014-09-15loplugin:salbool env var is no longer necessary, all code is cleanStephan Bergmann1-27/+18
Change-Id: Ibf1d8c74dc8abb8c1fef59c53a8873cc426e2932
2014-09-12loplugin:salbool: exclude sal_Bool vars passed to non-const refStephan Bergmann1-0/+47
Change-Id: I45b323b326cc56cfc48e0abaa52d51fd86adbf79
2014-09-11Deactivate the sallogareas pluginTor Lillqvist2-0/+0
It's boring and a waste of time to have to keep registering in include/sal/log-areas.dox new log areas that other people have introduced. We don't really have a uniform policy for logging anyway, so why bother trying to enforce a such for the log areas? Anybody uses whatever log areas and log output style and formatting they want in the code they happen to be working on. And that's fine with me. We were supposed to be the project that avoids unnecessary process, rules and bureaucracy, right? Change-Id: I6bddcb56b58edcd885e5dc743c8730878de0036d
2014-09-08codebase is not yet cleaned up for loplugin:cstylecastStephan Bergmann1-0/+0
Change-Id: Ic2faece46bebea046eee984a0d53d9cd2892e0c9
2014-09-07create clang plugin to warn about C-style castsNoel Grandin1-0/+88
We don't like C-style casts in our nice C++ code Change-Id: I94e7ec90de9275cd6e20c4146d4f3a74bed93c9d Reviewed-on: https://gerrit.libreoffice.org/10367 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-08-28Adapt compilerplugins to Clang trunk towards 3.6Stephan Bergmann1-1/+7
Change-Id: Id1ce6c59f705f9c42855995e0ad590c6a3646613
2014-08-11Adapt compilerplugins to Clang trunk towards 3.6Stephan Bergmann2-0/+12
Change-Id: I0b7be1616a3e4206982f9f925de141ed9d53b96e
2014-07-30Adapt loplugin:derefnullptr to old Clang versionsStephan Bergmann1-1/+1
...where prior to r183883 "Implement core issue 903: only integer literals with value 0 and prvalues of type std::nullptr_t are null pointer constants from C++11 onwards," Expr::isNullPointerConstant with NPC_NeverValueDependent could go into an llvm_unreachable case. Change-Id: I29cf093f18ece4cd83fd759e30f72c2a71f69554
2014-07-29fix for running externandnotdefined plugin on UbuntuNoel Grandin1-2/+1
Change-Id: I00804b2dd63df44478a14a3eaf2fdcd4e4ce5d09
2014-07-24compilerplugins: Fix tutorials pluginsJuan Picca6-9/+9
Broken in commit 1f078fcaddd45bb074e4d0a4933db01f6e8b623e Change-Id: Ica93c3b9309b2ae4d973ccc34a84b5accac7472c Reviewed-on: https://gerrit.libreoffice.org/10478 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-07-11new loplugin: externalandnotdefinedNoel Grandin1-0/+79
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-02compat for Clang 3.2Stephan Bergmann2-2/+24
Change-Id: I2746abd05edd00dadfe613c17b9874b1035c3be4
2014-07-02Make configmgr loplugin:salbool-cleanStephan Bergmann1-13/+9
Change-Id: Ib1f33387c50bcd853140eb2fc46995d23d7f367b
2014-07-02loplugin:salbool: Fix handling of potentially overriding functionsStephan Bergmann1-23/+40
Change-Id: I63d00cf5ab1dac953fae07ca4eb4d987610551a2
2014-07-01Activate the "suspicious cast to sal_Bool" parts of loplugin:salboolStephan Bergmann1-17/+28
Change-Id: I78a368ef2899b2462251b45a327fc7b1f31fe764
2014-07-01New loplugin:stringconcatStephan Bergmann1-0/+82
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-06-27loplugin:unreffun: also warn about redundant redeclarationsStephan Bergmann1-0/+33
Change-Id: I9a812220b58cf6da00d854e65794f7c673ab239d
2014-06-27loplugin:unreffun: also warn about unused function templatesStephan Bergmann1-9/+14
Change-Id: I4a6280f47ca3c4a77b4e42fe05d79ded7fc30ef1
2014-06-24compilerplugins: move isUnoIncludeFile to base classNoel Grandin6-119/+31
to reduce copy-pasted code Change-Id: I7728d85dea7d0161998c326d6648ca681a8250d0
2014-06-24Clang trunk compat fixStephan Bergmann1-1/+2
Change-Id: Ic414ad0416e27e223ff702996b796b68d39709b9
2014-06-24new compilerplugin returnbyrefNoel Grandin1-0/+153
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-17Fix logic to obtain callee's FunctionProtoType (if any)Stephan Bergmann1-6/+11
Change-Id: I1bfdd865429cc6fa89ea3b6b4fc132b5d5b57b0d
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin1-53/+57
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-13loplugin:staticcallStephan Bergmann1-0/+49
Change-Id: Id46b391c09555c9ec30916fdd93b05455835d81b
2014-06-11New loplugin:derefnullptr (all violations already fixed)Stephan Bergmann1-0/+44
Change-Id: I32cd8e740855699036c420a091c282029f8d4a08
2014-06-09compile fixNoel Grandin1-2/+28
after my commit 184a00b96235f6432294ded63ce4a4a318effdb5 "loplugin: inlinesimplememberfunctions" Change-Id: Ib46d862b90566506c3035a12eeb01892b225ed51
2014-06-09improve safety of loplugin inlinesimplememberfunctionsNoel Grandin1-0/+13
don't try and move functions containing comments Change-Id: I2de8fc8be851af979acf9d1a91e7cdd9a5dc6a32
2014-06-04new loplugin: inlinesimpleaccessmethodsNoel Grandin1-0/+282
Create a rewriting plugin for finding methods that simply return object fields, and should therefore be declared in the header, so that the compiler can reduce method calls into a simple fixed-offset load instruction. Change-Id: I7a620fc54250b79681918dc31ed9a8f21118c037 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-30New loplugin:inlinevisible to flag inline functions marked DLLEXPORTStephan Bergmann1-0/+53
...which does not make sense. On Linux and Mac OS X, they potentially end up exported from multiple libs (weakly, though), while on Windows the potentially even end up not emitted at all, which could cause link errors. Change-Id: I092c9ba39e686c17b6e91581cdd4753f1c4d582f
2014-05-22Filter out all -fsanitize= args when building compilerpluginsStephan Bergmann1-1/+1
Change-Id: Ic809ddad81608f107749498c1432606403ee2314
2014-05-22loplugin-passbyref: ignore non-base declarationsNoel Grandin1-0/+7
Only consider base declarations, not overriden ones, or we warn on methods that are overriding stuff from external libraries. Change-Id: I08791c96f7adba5997ad237a98e7c08a759042ad
2014-05-20enhance pass-by-ref plugin to detect large argumentsNoel Grandin1-14/+20
Detect arguments larger than 64 chars passed by value. Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante1-1/+1
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-16combine the pass-by-ref clang pluginsNoel Grandin2-70/+14
Change-Id: Idac24afb7cb67fa2d539553fb9fa049c2d61ecf0
2014-05-14Find places where uno::Sequence is passed by value.Noel Grandin1-0/+63
Implement a clang plugin to find them, and clean up existing code to pass them by reference. Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8 Reviewed-on: https://gerrit.libreoffice.org/9351 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-09compilerplugins/clang: filter out -fsanitize=addressStephan Bergmann1-1/+1
Change-Id: I3e78bd86c8010124a2d006f288095aac26e60797
2014-04-17compilerplugins: Build them in parallel.Jan Holesovsky1-1/+5
Change-Id: Idddc9a2b76e33c7e90ca51cb2c53e0d9f34d3906
2014-04-15salbool: fix commentThomas Arnhold1-1/+1
accidently removed by 5babf1b9037eb283798322eecd8334e6ff1db655 maybe obsolete now Change-Id: Id1b8ce21e08ce2df5668252406bad6fb549b5206