]> granicus.if.org Git - clang/commitdiff
[analyzer] NullabilityChecker: Remove unused isReturnSelf() function.
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 28 Jan 2016 23:34:13 +0000 (23:34 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 28 Jan 2016 23:34:13 +0000 (23:34 +0000)
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

lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp

index ce6fde28b01287e5909ef2e77775e49e9af061ca..c00dee44dec6d55e7d4d66ec20b7bf910998746b 100644 (file)
@@ -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.
 ///