@@ -924,53 +924,13 @@ GenericParamList::clone(DeclContext *dc) const {
924
924
GenericTypeParamDecl::InvalidDepth,
925
925
param->getIndex ());
926
926
params.push_back (newParam);
927
-
928
- SmallVector<TypeLoc, 2 > inherited;
929
- for (auto loc : param->getInherited ())
930
- inherited.push_back (loc.clone (ctx));
931
- newParam->setInherited (ctx.AllocateCopy (inherited));
932
- }
933
-
934
- SmallVector<RequirementRepr, 2 > requirements;
935
- for (auto reqt : getRequirements ()) {
936
- switch (reqt.getKind ()) {
937
- case RequirementReprKind::TypeConstraint: {
938
- auto first = reqt.getSubjectLoc ();
939
- auto second = reqt.getConstraintLoc ();
940
- reqt = RequirementRepr::getTypeConstraint (
941
- first.clone (ctx),
942
- reqt.getSeparatorLoc (),
943
- second.clone (ctx));
944
- break ;
945
- }
946
- case RequirementReprKind::SameType: {
947
- auto first = reqt.getFirstTypeLoc ();
948
- auto second = reqt.getSecondTypeLoc ();
949
- reqt = RequirementRepr::getSameType (
950
- first.clone (ctx),
951
- reqt.getSeparatorLoc (),
952
- second.clone (ctx));
953
- break ;
954
- }
955
- case RequirementReprKind::LayoutConstraint: {
956
- auto first = reqt.getSubjectLoc ();
957
- auto layout = reqt.getLayoutConstraintLoc ();
958
- reqt = RequirementRepr::getLayoutConstraint (
959
- first.clone (ctx),
960
- reqt.getSeparatorLoc (),
961
- layout);
962
- break ;
963
- }
964
- }
965
-
966
- requirements.push_back (reqt);
967
927
}
968
928
969
929
return GenericParamList::create (ctx,
970
930
getLAngleLoc (),
971
931
params,
972
932
getWhereLoc (),
973
- requirements,
933
+ /* requirements= */ {} ,
974
934
getRAngleLoc ());
975
935
}
976
936
0 commit comments