D14479: Store sizeof and friends as numbers instead of comment.

Aaron Puchert noreply at phabricator.kde.org
Mon Aug 13 20:33:28 BST 2018

aaronpuchert added inline comments.


> michalsrb wrote in classmemberdeclaration.h:77
> I chose that because that is what `clang_Type_getSizeOf` returns. You can declare something like `char c[0x100000000]` and it will display the size properly.
> But I expect that almost no real code will have sizes or offsets this big, so we could use 32-bit integer instead and fallback to -1 for the extreme cases. Do you think we should?

For practical purposes, sizes >= 2^31 are probably indeed irrelevant. However, I think we should distinguish between no size information (which will happen for template classes, for example) and the size being to big. (Then we could show "size >= 2^31 bytes" or something similar in the UI.)

We could use -2 for that case (we have all the negative numbers available), but we should introduce symbolic constants for both -1 and -2 then.

  R32 KDevelop



To: michalsrb, #kdevelop, aaronpuchert
Cc: brauch, aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180813/670d01fc/attachment.html>

More information about the KDevelop-devel mailing list