What the heck is going on here in IdentifierTable.h, clang::IdentifierInfo::getLength

What’s going on with all the unsigned casts and the bitors? The actual length is stored as a type punned value in the first 8 bytes of second? Surely there’s a safer and more sensible way to do this? Is this what llvm::TrailingObjects is for? The fact that IndentifierInfo stores a C-style string makes me nervous about this.