diff options
author | John McCall <rjmccall@apple.com> | 2011-08-26 00:48:42 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-08-26 00:48:42 +0000 |
commit | 4906cf97fb6b7aebf5b1b8b99762f0f8fe1f15ea (patch) | |
tree | ee605749fdc9946db15b21ec51c9ac8e7eb896cb | |
parent | 1366862c3f5d390140b5978380d9ac7317d60fc6 (diff) |
Be sure to do unary conversions on the operand to an ARC
bridged cast. Noticed by AST inspection by Ted Kremenek!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138616 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index f3893ce2a5..db5de4ca9c 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -1820,6 +1820,10 @@ ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) { + ExprResult SubResult = UsualUnaryConversions(SubExpr); + if (SubResult.isInvalid()) return ExprError(); + SubExpr = SubResult.take(); + QualType T = TSInfo->getType(); QualType FromType = SubExpr->getType(); |