[NFC] Fix potential dereferencing of null return value.
authorSindhu Chittireddy <sindhu.chittireddy@intel.com>
Tue, 13 Jun 2023 21:37:58 +0000 (14:37 -0700)
committerSindhu Chittireddy <sindhu.chittireddy@intel.com>
Sat, 17 Jun 2023 03:31:08 +0000 (20:31 -0700)
commitc2888cddd5d98081fc82c51cb92be241144c6ffa
treea856aa5b865d857652bc7586d6fa23306955f8bf
parentb35c3fd780fa63309c1caa0d12cbb43d4afb2516
[NFC] Fix potential dereferencing of null return value.

Replace getAs with castAs and add assert if needed.
Differential Revision: https://reviews.llvm.org/D152977
clang/lib/AST/ASTContext.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp