Commit cc8a1504 authored by Simon Pilgrim's avatar Simon Pilgrim
Browse files

Merge isa<> and getAs<> calls to fix "pointer is null" static analyzer warnings. NFCI.

parent 25dc5c7c
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1642,9 +1642,8 @@ bool Sema::CheckMessageArgumentTypes(
          << Sel << isClassMessage << SourceRange(SelectorLocs.front(),
                                                SelectorLocs.back());
      // Find the class to which we are sending this message.
      if (ReceiverType->isObjCObjectPointerType()) {
        if (ObjCInterfaceDecl *ThisClass =
            ReceiverType->getAs<ObjCObjectPointerType>()->getInterfaceDecl()) {
      if (auto *ObjPT = ReceiverType->getAs<ObjCObjectPointerType>()) {
        if (ObjCInterfaceDecl *ThisClass = ObjPT->getInterfaceDecl()) {
          Diag(ThisClass->getLocation(), diag::note_receiver_class_declared);
          if (!RecRange.isInvalid())
            if (ThisClass->lookupClassMethod(Sel))