Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Friday 03 of August 2012, Caolán McNamara wrote:
On Fri, 2012-08-03 at 15:05 +0200, Lubos Lunak wrote:
- Find out what we can actually use it for. Some EasyHacks are a good
start, but the list might get quite long.

I'd be interested to know it'd be possible, in theory anyway, to detect
e.g. pointless OUString instances where only its ctor and dtor are
called and nothing else ?

 You mean things like this?

void foo()
{
OUString a;
}

 Yes, even in practice, see attachment.

 But I think this one is generic enough that it should be actually preferably 
done upstream. There are already GCC/Clang attributes pure and const for 
marking functions, so there could be a similar attribute to mark ctors/dtors 
of classes where the ctor/dtor themselves do not have any side-effects (for a 
suitable definition of side-effect).

-- 
 Lubos Lunak
 l.lunak@suse.cz

Attachment: loplugin.tar.gz
Description: application/tgz


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.