[CodeComplete] Fix crash when completing inside a result builder containing a variable initialized with nil

Resolves rdar://78017503
This commit is contained in:
Alex Hoppen
2021-05-14 17:21:26 +02:00
parent cf2c052628
commit ad5dc2d76f
2 changed files with 16 additions and 0 deletions

View File

@@ -4718,6 +4718,9 @@ bool constraints::isStandardComparisonOperator(ASTNode node) {
Optional<std::pair<Expr *, unsigned>>
ConstraintSystem::isArgumentExpr(Expr *expr) {
auto *argList = getParentExpr(expr);
if (!argList) {
return None;
}
if (isa<ParenExpr>(argList)) {
for (;;) {