diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 17:26:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 17:26:21 +0000 |
commit | c3ceec3848d78cb72cc4fbe26115b4527f6e5919 (patch) | |
tree | 623d4d420da5f915043ed4724116f29b2f49d41e /lib/Sema/SemaExprObjC.cpp | |
parent | ab0cf0608f271c56e04920e91b3cf20bb15a0464 (diff) |
[Objective-C]. revert r220740,r220727
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 5746e73294..40ab95b6ec 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -4075,22 +4075,11 @@ ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, // Okay: id -> CF CK = CK_BitCast; switch (Kind) { - case OBC_Bridge: { - const ImplicitCastExpr *implCE = dyn_cast<ImplicitCastExpr>(SubExpr); - while (implCE && implCE->getCastKind() == CK_BitCast) - implCE = dyn_cast<ImplicitCastExpr>(implCE->getSubExpr()); - if (implCE && (implCE->getCastKind() == CK_ARCConsumeObject)) - if (const Expr *LitExp = implCE->getSubExpr()) - if ((isa<ObjCArrayLiteral>(LitExp) || - isa<ObjCDictionaryLiteral>(LitExp)) && - T->isCARCBridgableType()) - Diag(BridgeKeywordLoc, diag::warn_arc_consumed_object_released) - << T << implCE->getType(); - // Reclaiming a value that's going to be __bridge-casted to CF - // is very dangerous, so we don't do it. - SubExpr = maybeUndoReclaimObject(SubExpr); - break; - } + case OBC_Bridge: + // Reclaiming a value that's going to be __bridge-casted to CF + // is very dangerous, so we don't do it. + SubExpr = maybeUndoReclaimObject(SubExpr); + break; case OBC_BridgeRetained: // Produce the object before casting it. |