summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
index ce6fde28b01..c00dee44dec 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
@@ -470,22 +470,6 @@ static const Expr *lookThroughImplicitCasts(const Expr *E) {
return E;
}
-/// Returns true when the return statement is a syntactic 'return self' in
-/// Objective-C.
-static bool isReturnSelf(const ReturnStmt *RS, CheckerContext &C) {
- const ImplicitParamDecl *SelfDecl =
- C.getCurrentAnalysisDeclContext()->getSelfDecl();
- if (!SelfDecl)
- return false;
-
- const Expr *ReturnExpr = lookThroughImplicitCasts(RS->getRetValue());
- auto *RefExpr = dyn_cast<DeclRefExpr>(ReturnExpr);
- if (!RefExpr)
- return false;
-
- return RefExpr->getDecl() == SelfDecl;
-}
-
/// This method check when nullable pointer or null value is returned from a
/// function that has nonnull return type.
///
OpenPOWER on IntegriCloud