[ubsan] Skip null check for "offsetof"-like computations

When computing the address of a member expression, skip the null check
on the base expression if it's a constant null pointer. This indicates
that the null pointer is intentionally being manipulated to compute a
field offset.

rdar://problem/28992749
(cherry picked from commit 638fa2b35af426deff7e3b8f75d0be69df8f7130)
2 files changed