Skip to content

Commit 78a5b82

Browse files
committed
Modify spelling and whitespace
1 parent c5efb80 commit 78a5b82

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/swift/AST/AutoDiff.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ class TangentSpace {
365365
return {Kind::TangentVector, tangentVectorType};
366366
}
367367
static TangentSpace getTuple(TupleType *tupleTy) {
368-
return {Kind::Tuple, tupleTy};
369-
}
368+
return {Kind::Tuple, tupleTy};
369+
}
370370

371371
bool isTangentVector() const { return kind == Kind::TangentVector; }
372372
bool isTuple() const { return kind == Kind::Tuple; }

lib/Sema/TypeChecker.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -618,15 +618,15 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
618618
dc, stage);
619619
}) != params.end();
620620
bool alreadyDiagnosedOneParam = false;
621-
bool hasInoutDifferentiableParameter = false;
621+
bool hasDifferentiableInoutParameter = false;
622622
for (unsigned i = 0, end = fnTy->getNumParams(); i != end; ++i) {
623623
auto param = params[i];
624624
if (param.isNoDerivative())
625625
continue;
626626
auto paramType = param.getPlainType();
627627
if (TypeChecker::isDifferentiable(paramType, isLinear, dc, stage)) {
628628
if (param.isInOut())
629-
hasInoutDifferentiableParameter = true;
629+
hasDifferentiableInoutParameter = true;
630630
continue;
631631
}
632632
auto diagLoc =
@@ -662,7 +662,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
662662
bool differentiableResultExists = resultExists && resultIsDifferentiable;
663663

664664
// Reject the case where there are multiple semantic results.
665-
if (differentiableResultExists && hasInoutDifferentiableParameter) {
665+
if (differentiableResultExists && hasDifferentiableInoutParameter) {
666666
auto diagLoc = repr ? (*repr)->getArgsTypeRepr()->getLoc() : loc;
667667
auto diag = ctx.Diags.diagnose(
668668
diagLoc,
@@ -675,7 +675,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
675675
}
676676

677677
// Reject the case where the semantic result is not differentiable.
678-
if (!resultIsDifferentiable && !hasInoutDifferentiableParameter) {
678+
if (!resultIsDifferentiable && !hasDifferentiableInoutParameter) {
679679
auto diagLoc = repr ? (*repr)->getResultTypeRepr()->getLoc() : loc;
680680
auto resultStr = fnTy->getResult()->getString();
681681
auto diag = ctx.Diags.diagnose(
@@ -689,7 +689,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
689689
}
690690

691691
// Reject the case where there are no semantic results.
692-
if (!resultExists && !hasInoutDifferentiableParameter) {
692+
if (!resultExists && !hasDifferentiableInoutParameter) {
693693
auto diagLoc = repr ? (*repr)->getResultTypeRepr()->getLoc() : loc;
694694
auto diag = ctx.Diags.diagnose(
695695
diagLoc, diag::differentiable_function_type_no_differentiable_result,

0 commit comments

Comments
 (0)