On Mon, Nov 28, 2011 at 1:38 PM, Lang Hames <[email protected]> wrote:
> This patch adds a warning for implicit conversion from functions to > booleans. > > Could someone take a look and let me know if anything needs fixing or > improving? > > Cheers, > Lang. > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > > Can this be changed to catch cases like this: void foo(); if (&foo) {} Also, have you thought about formatting the diagnostic to use the DiagnoseImpCast() helper functions like the other implicit cast warnings? If you don't use it, it would be nice to add E->getSourceRange() to underline the function name.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
