[Constraint] NFC: Rename ClosureBodyElement to SyntacticElement

`SyntacticElement` represents a statement, pattern, declaration,
condition, or expression and could originate from i.e. a closure,
a function or a result builder body.
This commit is contained in:
Pavel Yaskevich
2022-04-26 09:50:45 -07:00
parent 565ed69c80
commit 6a65810d30
10 changed files with 84 additions and 84 deletions

View File

@@ -2189,7 +2189,7 @@ ConstraintSystem::matchTupleTypes(TupleType *tuple1, TupleType *tuple2,
case ConstraintKind::DefaultClosureType:
case ConstraintKind::UnresolvedMemberChainBase:
case ConstraintKind::PropertyWrapper:
case ConstraintKind::ClosureBodyElement:
case ConstraintKind::SyntacticElement:
case ConstraintKind::BindTupleOfFunctionParams:
llvm_unreachable("Not a conversion");
}
@@ -2352,7 +2352,7 @@ static bool matchFunctionRepresentations(FunctionType::ExtInfo einfo1,
case ConstraintKind::DefaultClosureType:
case ConstraintKind::UnresolvedMemberChainBase:
case ConstraintKind::PropertyWrapper:
case ConstraintKind::ClosureBodyElement:
case ConstraintKind::SyntacticElement:
case ConstraintKind::BindTupleOfFunctionParams:
return true;
}
@@ -2796,7 +2796,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
case ConstraintKind::DefaultClosureType:
case ConstraintKind::UnresolvedMemberChainBase:
case ConstraintKind::PropertyWrapper:
case ConstraintKind::ClosureBodyElement:
case ConstraintKind::SyntacticElement:
case ConstraintKind::BindTupleOfFunctionParams:
llvm_unreachable("Not a relational constraint");
}
@@ -6012,7 +6012,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
case ConstraintKind::DefaultClosureType:
case ConstraintKind::UnresolvedMemberChainBase:
case ConstraintKind::PropertyWrapper:
case ConstraintKind::ClosureBodyElement:
case ConstraintKind::SyntacticElement:
case ConstraintKind::BindTupleOfFunctionParams:
llvm_unreachable("Not a relational constraint");
}
@@ -13145,7 +13145,7 @@ ConstraintSystem::addConstraintImpl(ConstraintKind kind, Type first,
case ConstraintKind::KeyPath:
case ConstraintKind::KeyPathApplication:
case ConstraintKind::DefaultClosureType:
case ConstraintKind::ClosureBodyElement:
case ConstraintKind::SyntacticElement:
llvm_unreachable("Use the correct addConstraint()");
}
@@ -13675,9 +13675,9 @@ ConstraintSystem::simplifyConstraint(const Constraint &constraint) {
constraint.getFirstType(), constraint.getSecondType(),
/*flags=*/None, constraint.getLocator());
case ConstraintKind::ClosureBodyElement:
return simplifyClosureBodyElementConstraint(
constraint.getClosureElement(), constraint.getElementContext(),
case ConstraintKind::SyntacticElement:
return simplifySyntacticElementConstraint(
constraint.getSyntacticElement(), constraint.getElementContext(),
constraint.isDiscardedElement(),
/*flags=*/None, constraint.getLocator());