Skip to content

Commit 0316bb1

Browse files
committed
[CSFix] NFC: Fix a typo orRValueBase -> onRValueBase
1 parent 2404826 commit 0316bb1

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

lib/Sema/CSFix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,16 +644,16 @@ bool SkipUnhandledConstructInFunctionBuilder::diagnose(Expr *root,
644644
return failure.diagnose(asNote);
645645
}
646646

647-
bool AllowMutatingMemberOrRValueBase::diagnose(Expr *root, bool asNote) const {
647+
bool AllowMutatingMemberOnRValueBase::diagnose(Expr *root, bool asNote) const {
648648
auto &cs = getConstraintSystem();
649649
MutatingMemberRefOnImmutableBase failure(root, cs, getMember(), getLocator());
650650
return failure.diagnose(asNote);
651651
}
652652

653-
AllowMutatingMemberOrRValueBase *
654-
AllowMutatingMemberOrRValueBase::create(ConstraintSystem &cs, Type baseType,
653+
AllowMutatingMemberOnRValueBase *
654+
AllowMutatingMemberOnRValueBase::create(ConstraintSystem &cs, Type baseType,
655655
ValueDecl *member, DeclName name,
656656
ConstraintLocator *locator) {
657657
return new (cs.getAllocator())
658-
AllowMutatingMemberOrRValueBase(cs, baseType, member, name, locator);
658+
AllowMutatingMemberOnRValueBase(cs, baseType, member, name, locator);
659659
}

lib/Sema/CSFix.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ enum class FixKind : uint8_t {
182182

183183
/// Allow invalid reference to a member declared as `mutating`
184184
/// when base is an r-value type.
185-
AllowMutatingMemberOrRValueBase,
185+
AllowMutatingMemberOnRValueBase,
186186
};
187187

188188
class ConstraintFix {
@@ -862,11 +862,11 @@ class AllowInvalidInitRef final : public ConstraintFix {
862862
ConstraintLocator *locator);
863863
};
864864

865-
class AllowMutatingMemberOrRValueBase final : public AllowInvalidMemberRef {
866-
AllowMutatingMemberOrRValueBase(ConstraintSystem &cs, Type baseType,
865+
class AllowMutatingMemberOnRValueBase final : public AllowInvalidMemberRef {
866+
AllowMutatingMemberOnRValueBase(ConstraintSystem &cs, Type baseType,
867867
ValueDecl *member, DeclName name,
868868
ConstraintLocator *locator)
869-
: AllowInvalidMemberRef(cs, FixKind::AllowMutatingMemberOrRValueBase,
869+
: AllowInvalidMemberRef(cs, FixKind::AllowMutatingMemberOnRValueBase,
870870
baseType, member, name, locator) {}
871871

872872
public:
@@ -876,7 +876,7 @@ class AllowMutatingMemberOrRValueBase final : public AllowInvalidMemberRef {
876876

877877
bool diagnose(Expr *root, bool asNote = false) const override;
878878

879-
static AllowMutatingMemberOrRValueBase *
879+
static AllowMutatingMemberOnRValueBase *
880880
create(ConstraintSystem &cs, Type baseType, ValueDecl *member, DeclName name,
881881
ConstraintLocator *locator);
882882
};

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,7 +4763,7 @@ fixMemberRef(ConstraintSystem &cs, Type baseTy,
47634763
case MemberLookupResult::UR_MutatingMemberOnRValue:
47644764
case MemberLookupResult::UR_MutatingGetterOnRValue: {
47654765
return choice.isDecl()
4766-
? AllowMutatingMemberOrRValueBase::create(
4766+
? AllowMutatingMemberOnRValueBase::create(
47674767
cs, baseTy, choice.getDecl(), memberName, locator)
47684768
: nullptr;
47694769
}
@@ -6935,7 +6935,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
69356935
case FixKind::AllowInvalidRefInKeyPath:
69366936
case FixKind::ExplicitlySpecifyGenericArguments:
69376937
case FixKind::GenericArgumentsMismatch:
6938-
case FixKind::AllowMutatingMemberOrRValueBase:
6938+
case FixKind::AllowMutatingMemberOnRValueBase:
69396939
llvm_unreachable("handled elsewhere");
69406940
}
69416941

0 commit comments

Comments
 (0)