This is an archive of the discontinued LLVM Phabricator instance.

[AST] Pack the bits of TemplateSpecializationType into Type
ClosedPublic

Authored by riccibruno on Aug 13 2018, 9:57 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

riccibruno created this revision.Aug 13 2018, 9:57 AM

I think that this causes UB. The Type baseclass will use the TypeBitfields active member, but this uses the TemplateSpecializationTypeBits, right? I know we take advantage of this elsewhere, but I'm tentative about this one...

All of these bitfields (ab)use are already UB I think...
I don't see what is special in this case...

erichkeane accepted this revision.Aug 13 2018, 10:13 AM

Ah, right. I missed that the others already do it. Fine I guess...

This revision is now accepted and ready to land.Aug 13 2018, 10:13 AM

I don't like these bit-field abuses too much but this is
used all over the place in clang and so if this breaks so
many things are going to break.

update the comment in TemplateSpecializationTypeBitfields

erichkeane accepted this revision.Aug 15 2018, 7:13 AM
This revision was automatically updated to reflect the committed changes.