summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-01-28 23:34:13 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-01-28 23:34:13 +0000
commit134de6ffd88fef2c635276f75de4d8307d4385fa (patch)
tree45e36a896d5859db0ffeced29336796ae304e938 /clang/lib
parentc62e379d22d415a84191c653951fc2dc934c4b72 (diff)
downloadbcm5719-llvm-134de6ffd88fef2c635276f75de4d8307d4385fa.tar.gz
bcm5719-llvm-134de6ffd88fef2c635276f75de4d8307d4385fa.zip
[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. llvm-svn: 259118
Diffstat (limited to 'clang/lib')
-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