Author: dcoughlin Date: Thu Jan 28 17:34:13 2016 New Revision: 259118 URL: http://llvm.org/viewvc/llvm-project?rev=259118&view=rev Log: [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. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp?rev=259118&r1=259117&r2=259118&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp Thu Jan 28 17:34:13 2016 @@ -470,22 +470,6 @@ static const Expr *lookThroughImplicitCa 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. /// _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits