[NFC] Fix potential dereferencing of nullptr.
authorSindhu Chittireddy <sindhu.chittireddy@intel.com>
Mon, 19 Jun 2023 02:31:53 +0000 (19:31 -0700)
committerSindhu Chittireddy <sindhu.chittireddy@intel.com>
Thu, 22 Jun 2023 16:53:28 +0000 (09:53 -0700)
commitd2fafa79ef08f9ef9cd0108a6caa7fc61a31bdeb
treefc4370d2a33f8b84a46c8fdc9d1af6788eb0aa76
parent116953b82130df1ebd817b3587b16154f659c013
[NFC] Fix potential dereferencing of nullptr.

Replace getAs with castAs and add assert if needed.
Differential revision: https://reviews.llvm.org/D153236
clang/lib/Sema/SemaExprObjC.cpp
clang/lib/Sema/SemaObjCProperty.cpp
clang/lib/Sema/SemaType.cpp