As a replacement, we provide the accessors getImplicitObjectLocation() and
getBaseObjectLocation(), which are higher-level constructs that cover the use
cases in which SkipPast::ReferenceThenPointer was typically used.
Unfortunately, it isn't possible to use these accessors in
UncheckedOptionalAccessModel.cpp; I've added a FIXME to the code explaining the
details. I initially attempted to resolve the issue as part of this patch, but
it turned out to be non-trivial to fix. Instead, I have therefore added a
lower-level replacement for SkipPast::ReferenceThenPointer that is used only
within this file.
The wider context of this change is that SkipPast will be going away entirely.
See also the RFC at https://discourse.llvm.org/t/70086.
nit: no need for else since if branch always returns