forked from OSchip/llvm-project
Replace getAs with castAs to fix null dereference static analyzer warnings.
Use castAs as we know the cast should succeed (and castAs will assert if it doesn't) and we're dereferencing it directly in the canAssignObjCInterfaces call.
This commit is contained in:
parent
3e53bf5781
commit
5f9fcfb29e
|
@ -8698,8 +8698,8 @@ bool ASTContext::areComparableObjCPointerTypes(QualType LHS, QualType RHS) {
|
|||
|
||||
bool ASTContext::canBindObjCObjectType(QualType To, QualType From) {
|
||||
return canAssignObjCInterfaces(
|
||||
getObjCObjectPointerType(To)->getAs<ObjCObjectPointerType>(),
|
||||
getObjCObjectPointerType(From)->getAs<ObjCObjectPointerType>());
|
||||
getObjCObjectPointerType(To)->castAs<ObjCObjectPointerType>(),
|
||||
getObjCObjectPointerType(From)->castAs<ObjCObjectPointerType>());
|
||||
}
|
||||
|
||||
/// typesAreCompatible - C99 6.7.3p9: For two qualified types to be compatible,
|
||||
|
|
Loading…
Reference in New Issue