[cfe-dev] The QtReslot Clang plugin
Richard Braun via cfe-dev
cfe-dev at lists.llvm.org
Thu Feb 16 02:24:17 PST 2017
On Wed, Feb 15, 2017 at 05:55:13PM +0000, Sérgio Martins wrote:
> Beware that the new PMF syntax is not a drop in replacement for the old style.
> Applying these fixits on a codebase might introduce bugs.
Yes, the user is clearly made aware of this.
> Just for fun, can you run your plugin on clazy's unit-tests
> (clazy/tests/old-style-connect/*.cpp) and compared them to
> *fixed.cpp.expected, to see if it converted the connects correctly ?
Well clazy is a lot better it seems. I didn't take care of explicit
namespaces (although there is a TODO entry about that). QtReslot
also can't deal with wrong code, it merely converts, so things like
using SIGNAL() for a slot are caught, and a warning is emitted, but
nothing more.
On the other hand, clazy also seems a lot more intrusive, but I suppose
it's worth it considering the context. I wish I knew it existed and
could do such conversions before I started QtReslot, although I can't
give any advice on how to increase awareness about it.
--
Richard Braun
More information about the cfe-dev
mailing list