Conversation
…AstContext::c_types` note: this is a hack because it adds a memory leak in the `Index` impl
|
I was thinking about this but had a different approach in mind. Instead of trying to synthesize a new type, just pass an override for the pointee/element type to |
I believe the problem with that approach is that the Of course, we could address that via inversion of control, changing |
One note - I used |
9484b2a to
6e15fbf
Compare
| }; | ||
| // | ||
| // && Some(source_ty.ctype) != override_ty.map(|x| x.ctype) | ||
| let new_array_override_ty = self |
There was a problem hiding this comment.
Rather than trying to synthesize a completely new array type here, could convert_array_to_pointer_decay not be modified to take an element type instead of source and target types, and then called directly?
This isn't suitable for merging, but shows the constraints we're working in--namely, we need to synthesize a new
CTypeId(for the appropriately-sized array type of wide-chars, to replace the same array ofc_ints) in a place where theTypedAstContextis not mutable.