summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9c6f8f67407..d5ba089f733 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1313,18 +1313,6 @@ static bool ShouldDiagnoseUnusedDecl(const NamedDecl *D) {
}
}
- // Under ARC, some users use __bridge_transfer to automate memory
- // reclamation of objects that were referenced via C pointers.
- const Expr *Init = VD->getInit();
- if (Init) {
- if (const ExprWithCleanups *EC = dyn_cast<ExprWithCleanups>(Init))
- Init = EC->getSubExpr();
- Init = Init->IgnoreParens();
- if (const ImplicitCastExpr *IC = dyn_cast<ImplicitCastExpr>(Init))
- if (IC->getCastKind() == CK_ARCConsumeObject)
- return false;
- }
-
// TODO: __attribute__((unused)) templates?
}
OpenPOWER on IntegriCloud