This patch uses castAs instead of getAs to resolve dereference issue with nullptr boundObjC when calling
canAssignObjCInterfaces() or isObjCIdType() in applyObjCTypeArgs() since getAs returns nullptr.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D151964
// Retrieve the bound.
QualType bound = typeParam->getUnderlyingType();
- const auto *boundObjC = bound->getAs<ObjCObjectPointerType>();
+ const auto *boundObjC = bound->castAs<ObjCObjectPointerType>();
// Determine whether the type argument is substitutable for the bound.
if (typeArgObjC->isObjCIdType()) {