On Tue, Jan 15, 2013 at 6:17 AM, Vane, Edwin <[email protected]> wrote: > I tend to agree with Stefanus. If we were to make the use of nullptr a fixit > only it would mean a two-step process for anybody migrating their code base > with the cpp11-migrate tool: use cpp11-migrate to get everything but nullptr > and then use clang in fixit mode to get nullptr. A fixit is definitely > useful but having the same functionality in cpp11-migrate is also useful.
Sure enough. Is there anything we can do to mitigate the duplicated effort/code, then? > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Stefanus Du Toit > Sent: Monday, January 14, 2013 3:11 PM > To: David Blaikie > Cc: [email protected]; llvm > cfe; Siraj, Tareq A > Subject: Re: [cfe-commits] [PATCH] Added use-nullptr transform into > cpp11-migrate tool > > > > On Monday, January 14, 2013, David Blaikie wrote: > > On Mon, Jan 14, 2013 at 8:50 AM, Tareq A. Siraj <[email protected]> > wrote: >> This transform converts the usage of null pointer constants (e.g. NULL, 0, >> etc.) in legacy C++ code and converts them to use the new C++11 nullptr >> keyword. > > There are probably good reasons not to do this, but I'm still curious: > > Why not just build this in as a warning in clang with a FixIt? (&, if > necessary, have a Clang Tool designed for applying a particular fixit > to a codebase) GCC 4.8 already intends to have a > -Wzero-as-null-pointer warning which we could match. > > > > I think it makes sense to do this in both places. Having it in the rewriter > tool is sensible so it can be applied along with other C++11 > transformations. The warning/fixit also makes sense. The core of this can > probably be reused and live in Clang eventually, but start off in the tool. > > > > Stefanus _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
