summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-11-14 04:44:56 +0000
committerTed Kremenek <kremenek@apple.com>2013-11-14 04:44:56 +0000
commit435b4c786a66aca864d63e9e91e6d3ce4181eb0c (patch)
treeaac540db371fbd59d28f3213ec59de4123a2941f /clang/lib/Sema/SemaDecl.cpp
parent428b61dc1463bd24414c9c73f4c4d6edfc4f96e4 (diff)
downloadbcm5719-llvm-435b4c786a66aca864d63e9e91e6d3ce4181eb0c.tar.gz
bcm5719-llvm-435b4c786a66aca864d63e9e91e6d3ce4181eb0c.zip
Revert r194663 and r194647.
Per feedback from Jordan Rose I realized this wasn't the right way to go. llvm-svn: 194664
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-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