Skip to content

Commit 7ea64ae

Browse files
committed
[analyzer] Use IgnoreImpCasts() instead of reimplementing it.
No intended behavior change. Differential Revision: https://reviews.llvm.org/D77022
1 parent ba4764c commit 7ea64ae

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,7 @@ void NullabilityChecker::checkEvent(ImplicitNullDerefEvent Event) const {
508508
/// return expressions of ObjC types when the return type of the function or
509509
/// method is non-null but the express is not.
510510
static const Expr *lookThroughImplicitCasts(const Expr *E) {
511-
assert(E);
512-
513-
while (auto *ICE = dyn_cast<ImplicitCastExpr>(E)) {
514-
E = ICE->getSubExpr();
515-
}
516-
517-
return E;
511+
return E->IgnoreImpCasts();
518512
}
519513

520514
/// This method check when nullable pointer or null value is returned from a

0 commit comments

Comments
 (0)