]> granicus.if.org Git - clang/commit
[AST] Update/correct the static_asserts for the bit-fields in Type
authorBruno Ricci <riccibrun@gmail.com>
Mon, 13 Aug 2018 16:40:57 +0000 (16:40 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Mon, 13 Aug 2018 16:40:57 +0000 (16:40 +0000)
commitcde602ab8f076d1c32f01663eb7bf2073469255c
tree7a14269ac882221efea2c2c7622ed63d5817e56f
parent87be98223ce15a612013b6c44c725b714e62a35d
[AST] Update/correct the static_asserts for the bit-fields in Type

The current static_assert only checks that ObjCObjectTypeBitfields
fits into an unsigned. However it turns out that FunctionTypeBitfields
do not currently fits into an unsigned. Therefore the anonymous
union containing the bit-fields always use 8 bytes instead of 4.

This patch removes the lone misguided static_assert and systematically
checks the size of each bit-field.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D50630

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339582 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h