Skip to content

Commit

Permalink
[analyzer][NFC] Use MemRegion::getRegion()'s return value uncondition…
Browse files Browse the repository at this point in the history
…ally

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126123
  • Loading branch information
Balazs Benics committed May 27, 2022
1 parent 813acb1 commit 3a666dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/StaticAnalyzer/Core/SVals.cpp
Expand Up @@ -177,8 +177,7 @@ QualType SVal::getType(const ASTContext &Context) const {
}

const MemRegion *loc::MemRegionVal::stripCasts(bool StripBaseCasts) const {
const MemRegion *R = getRegion();
return R ? R->StripCasts(StripBaseCasts) : nullptr;
return getRegion()->StripCasts(StripBaseCasts);
}

const void *nonloc::LazyCompoundVal::getStore() const {
Expand Down

0 comments on commit 3a666dd

Please sign in to comment.