summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2017-09-28 01:31:17 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2017-09-28 01:31:17 +0000
commitfa1930c5060b2f2ce57b787019198da6be550ab0 (patch)
treeebdd76df46e183bc63b9bd33a8c859dee0ebdbbc /clang/lib/Sema/SemaExprObjC.cpp
parentd12238128827f1c69ef9b11c2fdcd76cdb659b7e (diff)
downloadbcm5719-llvm-fa1930c5060b2f2ce57b787019198da6be550ab0.tar.gz
bcm5719-llvm-fa1930c5060b2f2ce57b787019198da6be550ab0.zip
Look through parentheses.
This fixes a bug where clang would emit instructions to reclaim a value that's going to be __bridge-casted to CF. rdar://problem/34687542 llvm-svn: 314370
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index 83ef799392a..93c98235654 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -4322,7 +4322,7 @@ static Expr *maybeUndoReclaimObject(Expr *e) {
// problems here. To catch them all, we'd need to rebuild arbitrary
// value-propagating subexpressions --- we can't reliably rebuild
// in-place because of expression sharing.
- if (ImplicitCastExpr *ice = dyn_cast<ImplicitCastExpr>(e))
+ if (auto *ice = dyn_cast<ImplicitCastExpr>(e->IgnoreParens()))
if (ice->getCastKind() == CK_ARCReclaimReturnedObject)
return ice->getSubExpr();
OpenPOWER on IntegriCloud