[cfe-dev] What the heck is going on here in IdentifierTable.h, clang::IdentifierInfo::getLength

<Alexander G. Riccio> via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 11 12:47:09 PDT 2016


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.



​

Sincerely,
Alexander Riccio
--
"Change the world or go home."
about.me/ariccio

<http://about.me/ariccio>
If left to my own devices, I will build more.
⁂
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160811/7314c718/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IdentifierInfo.PNG
Type: image/png
Size: 22065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160811/7314c718/attachment.png>


More information about the cfe-dev mailing list