Currently ValueObject::GetValueAsUnsigned(...) calls ResolveValue(...) and then afterward marks the scalar as unsigned.
This approach fails when dealing with 1 bit BOOL bit-fields in ObjC since the call to scalar.ExtractBitfield(...) will end up sign extending the value. So in the case of a bit-field with a value of 1 we would instead end up with a value of 255 (since BOOL is a just unsigned char).
I adjusted the handling to check if the scalar is unsigned in ResolveValue(...) and handle accordingly.
You can do this with expect_expr which makes this less fragile (the ValueCheck stuff is backported to the last stable branch, so that shouldn't complicate backporting):
Also added the check for when BOOL = bool when this is on ARM (which seems to be how Clang decides if BOOL is bool or signed char). I guess a better check would be to check the underlying type for BOOL and see what it actually is, but let's fix this properly when we add type checking to the BOOL summary provider.