Be sure to do unary conversions on the operand to an ARC

bridged cast.  Noticed by AST inspection by Ted Kremenek!

llvm-svn: 138616
This commit is contained in:
John McCall 2011-08-26 00:48:42 +00:00
parent 35e4f0cd0f
commit eb07554d9c
1 changed files with 4 additions and 0 deletions

View File

@ -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();