[PATCH] Perform calculation of array size in chars instead of bits to prevent an assertion.

Richard Smith richard at metafoo.co.uk
Mon May 13 21:06:58 PDT 2013


  This looks good as far as it goes. However, anyone who calls the non-InChars version of getTypeInfo etc is still in danger. That includes many of the recursive calls in getTypeInfoImpl, for things like ParenType, DecltypeType, ElaboratedType, ...

  Ultimately, maybe we should be removing the non-InChars version, since there are types for which it simply cannot return a correct value. Are there any types for which both the size and alignment are not an exact number of CharUnits? (I would have thought this was obvious, but your GCC alignment attribute example has me questioning everything now...)

http://llvm-reviews.chandlerc.com/D781



More information about the cfe-commits mailing list