From 645c7eef919a21ba6a879c5e2d6b1fd11f628477 Mon Sep 17 00:00:00 2001 From: Devin Coughlin Date: Thu, 28 Jan 2016 23:34:13 +0000 Subject: [PATCH] [analyzer] NullabilityChecker: Remove unused isReturnSelf() function. Remove the now-unused isReturnSelf() function so we don't get a compiler warning. Apologies for not doing this in r259099. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259118 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Checkers/NullabilityChecker.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp b/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp index ce6fde28b0..c00dee44de 100644 --- a/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp +++ b/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(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. /// -- 2.40.0