Skip to content

Commit e840be0

Browse files
authored
Merge pull request #22559 from xedin/fix-accesors-on-fixes
[CSFix] NFC: Fixes should only be created via `create(...)`
2 parents c90838a + 4a2e889 commit e840be0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Sema/CSFix.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ class ContextualMismatch : public ConstraintFix {
441441
/// }
442442
/// ```
443443
class AutoClosureForwarding final : public ConstraintFix {
444-
public:
445444
AutoClosureForwarding(ConstraintSystem &cs, ConstraintLocator *locator)
446445
: ConstraintFix(cs, FixKind::AutoClosureForwarding, locator) {}
447446

447+
public:
448448
std::string getName() const override { return "fix @autoclosure forwarding"; }
449449

450450
bool diagnose(Expr *root, bool asNote = false) const override;
@@ -456,10 +456,10 @@ class AutoClosureForwarding final : public ConstraintFix {
456456
class RemoveUnwrap final : public ConstraintFix {
457457
Type BaseType;
458458

459-
public:
460459
RemoveUnwrap(ConstraintSystem &cs, Type baseType, ConstraintLocator *locator)
461460
: ConstraintFix(cs, FixKind::RemoveUnwrap, locator), BaseType(baseType) {}
462461

462+
public:
463463
std::string getName() const override {
464464
return "remove unwrap operator `!` or `?`";
465465
}
@@ -471,10 +471,10 @@ class RemoveUnwrap final : public ConstraintFix {
471471
};
472472

473473
class InsertExplicitCall final : public ConstraintFix {
474-
public:
475474
InsertExplicitCall(ConstraintSystem &cs, ConstraintLocator *locator)
476475
: ConstraintFix(cs, FixKind::InsertCall, locator) {}
477476

477+
public:
478478
std::string getName() const override {
479479
return "insert explicit `()` to make a call";
480480
}
@@ -486,10 +486,10 @@ class InsertExplicitCall final : public ConstraintFix {
486486
};
487487

488488
class UseSubscriptOperator final : public ConstraintFix {
489-
public:
490489
UseSubscriptOperator(ConstraintSystem &cs, ConstraintLocator *locator)
491490
: ConstraintFix(cs, FixKind::UseSubscriptOperator, locator) {}
492491

492+
public:
493493
std::string getName() const override {
494494
return "replace '.subscript(...)' with subscript operator";
495495
}
@@ -504,12 +504,12 @@ class DefineMemberBasedOnUse final : public ConstraintFix {
504504
Type BaseType;
505505
DeclName Name;
506506

507-
public:
508507
DefineMemberBasedOnUse(ConstraintSystem &cs, Type baseType, DeclName member,
509508
ConstraintLocator *locator)
510509
: ConstraintFix(cs, FixKind::DefineMemberBasedOnUse, locator),
511510
BaseType(baseType), Name(member) {}
512511

512+
public:
513513
std::string getName() const override {
514514
llvm::SmallVector<char, 16> scratch;
515515
auto memberName = Name.getString(scratch);
@@ -525,12 +525,12 @@ class DefineMemberBasedOnUse final : public ConstraintFix {
525525
};
526526

527527
class AllowInvalidPartialApplication final : public ConstraintFix {
528-
public:
529528
AllowInvalidPartialApplication(bool isWarning, ConstraintSystem &cs,
530529
ConstraintLocator *locator)
531530
: ConstraintFix(cs, FixKind::AllowInvalidPartialApplication, locator,
532531
isWarning) {}
533532

533+
public:
534534
std::string getName() const override {
535535
return "allow partially applied 'mutating' method";
536536
}

0 commit comments

Comments
 (0)