Skip to content

Commit 734f5b6

Browse files
committed
[Diagnostics] NFC: Fix typo(s) raw representative -> representable
1 parent f9e99ed commit 734f5b6

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6308,7 +6308,7 @@ bool AbstractRawRepresentableFailure::diagnoseAsNote() {
63086308
return false;
63096309
}
63106310

6311-
void MissingRawRepresentativeInitFailure::fixIt(
6311+
void MissingRawRepresentableInitFailure::fixIt(
63126312
InFlightDiagnostic &diagnostic) const {
63136313
if (auto *E = getAsExpr(getAnchor())) {
63146314
auto range = E->getSourceRange();

lib/Sema/CSDiagnostics.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,12 +2121,12 @@ class AbstractRawRepresentableFailure : public FailureDiagnostic {
21212121
///
21222122
/// `0` has to be wrapped into `E(rawValue: 0)` and either defaulted via `??` or
21232123
/// force unwrapped to constitute a valid binding.
2124-
class MissingRawRepresentativeInitFailure final
2124+
class MissingRawRepresentableInitFailure final
21252125
: public AbstractRawRepresentableFailure {
21262126
public:
2127-
MissingRawRepresentativeInitFailure(const Solution &solution,
2128-
Type rawReprType, Type expectedType,
2129-
ConstraintLocator *locator)
2127+
MissingRawRepresentableInitFailure(const Solution &solution, Type rawReprType,
2128+
Type expectedType,
2129+
ConstraintLocator *locator)
21302130
: AbstractRawRepresentableFailure(solution, rawReprType, expectedType,
21312131
locator) {}
21322132

lib/Sema/CSFix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,8 @@ bool ExpandArrayIntoVarargs::diagnose(const Solution &solution,
11241124

11251125
bool ExplicitlyConstructRawRepresentable::diagnose(const Solution &solution,
11261126
bool asNote) const {
1127-
MissingRawRepresentativeInitFailure failure(solution, RawReprType,
1128-
ExpectedType, getLocator());
1127+
MissingRawRepresentableInitFailure failure(solution, RawReprType,
1128+
ExpectedType, getLocator());
11291129
return failure.diagnose(asNote);
11301130
}
11311131

lib/Sema/CSSimplify.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,8 +3164,8 @@ bool ConstraintSystem::repairFailures(
31643164
// and if so check that given `expectedType` matches its `RawValue` type. If
31653165
// that condition holds add a tailored fix which is going to suggest to
31663166
// explicitly construct a raw representable type from a given value type.
3167-
auto repairByExplicitRawRepresentativeUse = [&](Type expectedType,
3168-
Type rawReprType) -> bool {
3167+
auto repairByConstructingRawRepresentableType =
3168+
[&](Type expectedType, Type rawReprType) -> bool {
31693169
if (!isValueOfRawRepresentable(expectedType, rawReprType))
31703170
return false;
31713171

@@ -3406,7 +3406,7 @@ bool ConstraintSystem::repairFailures(
34063406
return true;
34073407

34083408
// `rhs` - is an assignment destination and `lhs` is its source.
3409-
if (repairByExplicitRawRepresentativeUse(lhs, rhs))
3409+
if (repairByConstructingRawRepresentableType(lhs, rhs))
34103410
return true;
34113411

34123412
if (repairByUsingRawValueOfRawRepresentableType(lhs, rhs))
@@ -3674,7 +3674,7 @@ bool ConstraintSystem::repairFailures(
36743674
return true;
36753675

36763676
// `lhs` - is an argument and `rhs` is a parameter type.
3677-
if (repairByExplicitRawRepresentativeUse(lhs, rhs))
3677+
if (repairByConstructingRawRepresentableType(lhs, rhs))
36783678
break;
36793679

36803680
if (repairByUsingRawValueOfRawRepresentableType(lhs, rhs))
@@ -3914,7 +3914,7 @@ bool ConstraintSystem::repairFailures(
39143914
break;
39153915

39163916
// `lhs` - is an result type and `rhs` is a contextual type.
3917-
if (repairByExplicitRawRepresentativeUse(lhs, rhs))
3917+
if (repairByConstructingRawRepresentableType(lhs, rhs))
39183918
break;
39193919

39203920
conversionsOrFixes.push_back(IgnoreContextualType::create(

0 commit comments

Comments
 (0)