[analyzer][NFC] Use MemRegion::getRegion()'s return value unconditionally

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126123
This commit is contained in:
Balazs Benics 2022-05-27 10:07:06 +02:00
parent 813acb1297
commit 3a666dd37a
1 changed files with 1 additions and 2 deletions

View File

@ -177,8 +177,7 @@ QualType SVal::getType(const ASTContext &Context) const {
} }
const MemRegion *loc::MemRegionVal::stripCasts(bool StripBaseCasts) const { const MemRegion *loc::MemRegionVal::stripCasts(bool StripBaseCasts) const {
const MemRegion *R = getRegion(); return getRegion()->StripCasts(StripBaseCasts);
return R ? R->StripCasts(StripBaseCasts) : nullptr;
} }
const void *nonloc::LazyCompoundVal::getStore() const { const void *nonloc::LazyCompoundVal::getStore() const {