This change adds UBSan check to upcasts. Namely, when we
perform derived-to-base conversion, we:
- check that the pointer-to-derived has suitable alignment and underlying storage, if this pointer is non-null.
- if vptr-sanitizer is enabled, and we perform conversion to virtual base, we check that pointer-to-derived has a matching vptr.
For now, this change lacks UBSan output tests in compiler-rt, I'm sending
it as an RFC to check that I'm doing the correct thing, and to agree
on error messages and enums wordings.
I am not sure that the SkipNullCheck behavior here is right. If NullCheckValue is false, then I think we should be performing a null check inside EmitTypeCheck rather than assuming the pointer is non-null.