[cfe-commits] [PATCH] PR9812: _Bool != bool

Douglas Gregor dgregor at apple.com
Tue Jun 14 07:43:43 PDT 2011


On Jun 12, 2011, at 5:42 AM, Richard Smith wrote:

> Hi,
> 
> The attached patch fixes PR9812 by splitting TST_bool into TST_bool (for
> C++ bool) and TST__Bool (for C99 _Bool). They both still translate into
> BuiltinType::Bool, but are now given the appropriate names in diagnostics.

Cool, thanks!

> One subtlety: BuiltinTypeLoc::getWrittenTypeSpec tries to convert
> backwards from a BuiltinType to a TypeSpecifierType. I've arbitrarily made
> this continue to produce TST_bool for BuiltinType::Bool, but this code is
> actually not currently reachable: the function is only called by the AST
> serialization code, and only in cases where the type cannot be bool.

Weird, but okay.

> OK to commit?


Yes, looks good.

	- Doug



More information about the cfe-commits mailing list