diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-09-15 21:19:39 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-09-15 21:19:39 +0000 |
commit | bc357ac9dba1b08589867405dacb0ca2ebd2f736 (patch) | |
tree | f271ce2fe5bd9bd6b5e7e76bdeef1b76cdeb29a3 /lib/Sema/SemaPseudoObject.cpp | |
parent | fe43cf05ff6f62ace630d7710f0319f10c7a2a33 (diff) |
Objective-C. Prevents a crash generating AST for a
a property assignment due to numerous user errors.
Cannot come up with a reasonable test case due to
array of user errors before the crash point.
rdar://17813651.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index 7bfe333749..5e92d5d07c 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -406,6 +406,10 @@ PseudoOpBuilder::buildAssignmentOperation(Scope *Sc, SourceLocation opcLoc, BinaryOperatorKind opcode, Expr *LHS, Expr *RHS) { assert(BinaryOperator::isAssignmentOp(opcode)); + + // Recover from user error + if (isa<UnresolvedLookupExpr>(RHS)) + return ExprError(); Expr *syntacticLHS = rebuildAndCaptureObject(LHS); OpaqueValueExpr *capturedRHS = capture(RHS); |