[cfe-commits] [PATCH] Added use-nullptr transform into cpp11-migrate tool

David Blaikie dblaikie at gmail.com
Tue Jan 15 09:20:25 PST 2013


On Tue, Jan 15, 2013 at 9:04 AM, Vane, Edwin <edwin.vane at intel.com> wrote:
> David wrote:
>> Sure enough. Is there anything we can do to mitigate the duplicated effort/code, then?
>
> I think in this case there's not much to worry about. I can't really think of any other transforms cpp11-migrate might perform that relate to warnings as clearly as nullptr does. Also, I'm not really familiar with how fixits are implemented but if it's with AST Matchers in any way, the matcher employed by use-nullptr is pretty trivial. IMO, since this seems like a unique case and the amount of code involved is small that duplication isn't a big concern in general with cpp11-migrate. We should definitely keep an eye out though in case other situations crop up. I think the only way to handle that is to be clear about which transforms are being considered for implementation so duplication can be spotted early.

Yes, I agree that it's not likely (m)any other transforms would hit
this particular issue. One concern might be divergence - since the
warnings in Clang aren't implemented as AST matchers (I believe it's
something that might happen one day, but I'm not sure) the possibility
that the migration tool might not catch the same cases that Clang
proper does, leading users to have to use both anyway - that would be
unfortunate.




More information about the cfe-commits mailing list