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
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.
///