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

Richard Smith richard at metafoo.co.uk
Mon Apr 11 16:40:45 PDT 2011


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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-ref-serialize.diff
Type: text/x-patch
Size: 2278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110412/e515eebe/attachment.bin>

More information about the cfe-commits mailing list