[cfe-commits] [PATCH] Fix AST serialization of ReferenceTypes

Richard Smith richard at metafoo.co.uk
Tue Apr 12 03:46:38 PDT 2011


On Tue, April 12, 2011 03:17, Douglas Gregor wrote:
> On Apr 11, 2011, at 4:40 PM, Richard Smith wrote:
>> AST serialization of reference types currently writes out the pointer
>> type, not the pointer type as written. This causes a crash when
>> deserializing the AST for this:
>>
>> typedef char (&R); extern R &r;
>>
>> (I think this is because we save a type reference to a non-top-level
>> type). The attached patch fixes this. I also noticed that
>> SpelledAsLValue
>> didn't appear to be saved for LValueReferenceTypes, so the patch fixes
>> that too.
>>
>> OK to check in?
>>
>
> LGTM, thanks!

r129358. I slightly tweaked the test; further testing showed that an
extern reference isn't enough to trigger the assert.

Richard





More information about the cfe-commits mailing list