[NFC] Thread DeclNameRef through most of the compiler

This huge commit contains as many of the mechanical changes as possible.
This commit is contained in:
Brent Royal-Gordon
2019-12-10 19:46:10 -08:00
parent da88512eda
commit addbe3e5ed
66 changed files with 505 additions and 464 deletions

View File

@@ -88,14 +88,14 @@ bool UnwrapOptionalBase::diagnose(bool asNote) const {
}
UnwrapOptionalBase *UnwrapOptionalBase::create(ConstraintSystem &cs,
DeclName member,
DeclNameRef member,
ConstraintLocator *locator) {
return new (cs.getAllocator())
UnwrapOptionalBase(cs, FixKind::UnwrapOptionalBase, member, locator);
}
UnwrapOptionalBase *UnwrapOptionalBase::createWithOptionalResult(
ConstraintSystem &cs, DeclName member, ConstraintLocator *locator) {
ConstraintSystem &cs, DeclNameRef member, ConstraintLocator *locator) {
return new (cs.getAllocator()) UnwrapOptionalBase(
cs, FixKind::UnwrapOptionalBaseWithOptionalResult, member, locator);
}
@@ -428,14 +428,14 @@ bool DefineMemberBasedOnUse::diagnose(bool asNote) const {
DefineMemberBasedOnUse *
DefineMemberBasedOnUse::create(ConstraintSystem &cs, Type baseType,
DeclName member, ConstraintLocator *locator) {
DeclNameRef member, ConstraintLocator *locator) {
return new (cs.getAllocator())
DefineMemberBasedOnUse(cs, baseType, member, locator);
}
AllowMemberRefOnExistential *
AllowMemberRefOnExistential::create(ConstraintSystem &cs, Type baseType,
ValueDecl *member, DeclName memberName,
ValueDecl *member, DeclNameRef memberName,
ConstraintLocator *locator) {
return new (cs.getAllocator())
AllowMemberRefOnExistential(cs, baseType, memberName, member, locator);
@@ -457,7 +457,7 @@ bool AllowTypeOrInstanceMember::diagnose(bool asNote) const {
AllowTypeOrInstanceMember *
AllowTypeOrInstanceMember::create(ConstraintSystem &cs, Type baseType,
ValueDecl *member, DeclName usedName,
ValueDecl *member, DeclNameRef usedName,
ConstraintLocator *locator) {
return new (cs.getAllocator())
AllowTypeOrInstanceMember(cs, baseType, member, usedName, locator);
@@ -618,7 +618,7 @@ bool AllowInaccessibleMember::diagnose(bool asNote) const {
AllowInaccessibleMember *
AllowInaccessibleMember::create(ConstraintSystem &cs, Type baseType,
ValueDecl *member, DeclName name,
ValueDecl *member, DeclNameRef name,
ConstraintLocator *locator) {
return new (cs.getAllocator())
AllowInaccessibleMember(cs, baseType, member, name, locator);
@@ -793,7 +793,7 @@ bool AllowMutatingMemberOnRValueBase::diagnose(bool asNote) const {
AllowMutatingMemberOnRValueBase *
AllowMutatingMemberOnRValueBase::create(ConstraintSystem &cs, Type baseType,
ValueDecl *member, DeclName name,
ValueDecl *member, DeclNameRef name,
ConstraintLocator *locator) {
return new (cs.getAllocator())
AllowMutatingMemberOnRValueBase(cs, baseType, member, name, locator);
@@ -1102,7 +1102,7 @@ bool SpecifyBaseTypeForContextualMember::diagnose(bool asNote) const {
}
SpecifyBaseTypeForContextualMember *SpecifyBaseTypeForContextualMember::create(
ConstraintSystem &cs, DeclName member, ConstraintLocator *locator) {
ConstraintSystem &cs, DeclNameRef member, ConstraintLocator *locator) {
return new (cs.getAllocator())
SpecifyBaseTypeForContextualMember(cs, member, locator);
}