[cfe-commits] {Review Request]C++ C Style Cast Checker

Douglas Gregor dgregor at apple.com
Sat May 21 08:55:43 PDT 2011

On May 21, 2011, at 2:57 AM, Johannes Schaub (litb) wrote:

> Jim Goodnow II wrote:
>> I still think it's useful to detect them all since part of the idea for
>> the C++ style casts is to make them stand out more. However, it might be
>> useful to have different messages for static_cast's versus potentially
>> more dangerous ones.
> This adds much of noise to the output IMO :/ Is it enabled by default? 

It will certainly not be enabled by default.

GCC has a warning option -Wold-style-cast. I think it's perfectly reasonable to implement this warning in Sema (and should be very) easy. However, if we're going to do this, we should also provide Fix-Its to rewrite the code into the appropriate static_cast/const_cast/reinterpret_cast. 

	- Doug

More information about the cfe-commits mailing list