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

Richard Smith richard at metafoo.co.uk
Sun Jun 12 05:42:19 PDT 2011


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.

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.

OK to commit?

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr9812.diff
Type: text/x-patch
Size: 5653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110612/ae08f482/attachment.bin>


More information about the cfe-commits mailing list