[Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of...
[Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum Currently in Sema::ActOnEnumBody(...) when calculating NumPositiveBits we miss the case where there is only a single enumerator with value zero and the case of an empty enum. In both cases we end up with zero positive bits when in fact we need one bit to store the value zero. This PR updates the calculation to account for these cases. Differential Revision: https://reviews.llvm.org/D130301
parent
45944e7c
Please register or sign in to comment