Skip to content

Commit ea49487

Browse files
committed
80 char limit and TODO comment removal.
1 parent e688135 commit ea49487

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

include/swift/AST/Attr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ class DifferentiableAttr final
14961496
ParsedAutoDiffParameter> {
14971497
friend TrailingObjects;
14981498

1499-
/// Whether this function is linear (optional)
1499+
/// Whether this function is linear (optional).
15001500
bool linear;
15011501
/// The number of parsed parameters specified in 'wrt:'.
15021502
unsigned NumParsedParameters = 0;

lib/AST/Attr.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,9 +1408,11 @@ void DifferentiableAttr::print(llvm::raw_ostream &OS, const Decl *D,
14081408
// SWIFT_ENABLE_TENSORFLOW
14091409
DifferentiatingAttr::DifferentiatingAttr(
14101410
ASTContext &context, bool implicit, SourceLoc atLoc, SourceRange baseRange,
1411-
DeclNameWithLoc original, bool linear, ArrayRef<ParsedAutoDiffParameter> params)
1411+
DeclNameWithLoc original, bool linear,
1412+
ArrayRef<ParsedAutoDiffParameter> params)
14121413
: DeclAttribute(DAK_Differentiating, atLoc, baseRange, implicit),
1413-
Original(std::move(original)), linear(linear), NumParsedParameters(params.size()) {
1414+
Original(std::move(original)), linear(linear),
1415+
NumParsedParameters(params.size()) {
14141416
std::copy(params.begin(), params.end(),
14151417
getTrailingObjects<ParsedAutoDiffParameter>());
14161418
}

lib/Sema/DerivedConformanceDifferentiable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ getOrSynthesizeSingleAssociatedStruct(DerivedConformance &derived,
744744
requirements = extDecl->getGenericRequirements();
745745
auto *diffableAttr = DifferentiableAttr::create(
746746
C, /*implicit*/ true, SourceLoc(), SourceLoc(),
747-
/* TODO linear*/ false, {}, None, None, requirements);
747+
/*linear*/ false, {}, None, None, requirements);
748748
member->getAttrs().add(diffableAttr);
749749
// If getter does not exist, trigger synthesis and compute type.
750750
if (!member->getGetter())

0 commit comments

Comments
 (0)