[NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return value...
authorManna, Soumi <soumi.manna@intel.com>
Fri, 2 Jun 2023 20:34:32 +0000 (13:34 -0700)
committerManna, Soumi <soumi.manna@intel.com>
Fri, 2 Jun 2023 20:40:45 +0000 (13:40 -0700)
commit82659941ccb88605ae4288f7506ef11e5fe3fc17
treeee716cc5917c8820f4c8c252e5d81ba0153e3c18
parent02ce49afb9a078932c74f4d9b43189a5567e54e9
[NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return value in applyObjCTypeArgs()

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
clang/lib/Sema/SemaType.cpp