diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 0d9a54e638..9aca5cd539 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -2598,7 +2598,10 @@ Parser::ParseObjCBoxedExpr(SourceLocation AtLoc) { ExprResult ValueExpr(ParseAssignmentExpression()); if (T.consumeClose()) return ExprError(); - + + if (ValueExpr.isInvalid()) + return ExprError(); + // Wrap the sub-expression in a parenthesized expression, to distinguish // a boxed expression from a literal. SourceLocation LPLoc = T.getOpenLocation(), RPLoc = T.getCloseLocation(); |