Skip to content

Commit 1058a38

Browse files
author
Marc Rasi
committed
clang-format
1 parent 6e559ab commit 1058a38

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

include/swift/AST/Types.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,9 +1856,9 @@ class ParameterTypeFlags {
18561856
}
18571857

18581858
ParameterTypeFlags withNoDerivative(bool noDerivative) const {
1859-
return ParameterTypeFlags(
1860-
noDerivative ? value | ParameterTypeFlags::NoDerivative
1861-
: value - ParameterTypeFlags::NoDerivative);
1859+
return ParameterTypeFlags(noDerivative
1860+
? value | ParameterTypeFlags::NoDerivative
1861+
: value - ParameterTypeFlags::NoDerivative);
18621862
}
18631863

18641864
bool operator ==(const ParameterTypeFlags &other) const {
@@ -1927,8 +1927,7 @@ class YieldTypeFlags {
19271927
ParameterTypeFlags asParamFlags() const {
19281928
return ParameterTypeFlags(/*variadic*/ false,
19291929
/*autoclosure*/ false,
1930-
/*nonEphemeral*/ false,
1931-
getValueOwnership(),
1930+
/*nonEphemeral*/ false, getValueOwnership(),
19321931
/*noDerivative*/ false);
19331932
}
19341933

@@ -5709,8 +5708,7 @@ inline ParameterTypeFlags ParameterTypeFlags::fromParameterType(
57095708
ownership == ValueOwnership::InOut);
57105709
ownership = ValueOwnership::InOut;
57115710
}
5712-
return {isVariadic, isAutoClosure, isNonEphemeral, ownership,
5713-
isNoDerivative};
5711+
return {isVariadic, isAutoClosure, isNonEphemeral, ownership, isNoDerivative};
57145712
}
57155713

57165714
inline const Type *BoundGenericType::getTrailingObjectsPointer() const {

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,8 @@ bool TypeResolver::resolveASTFunctionTypeParams(
24472447
if (!isDifferentiable &&
24482448
Context.LangOpts.EnableExperimentalDifferentiableProgramming)
24492449
diagnose(eltTypeRepr->getLoc(),
2450-
diag::attr_only_on_parameters_of_differentiable, "@noDerivative")
2450+
diag::attr_only_on_parameters_of_differentiable,
2451+
"@noDerivative")
24512452
.highlight(eltTypeRepr->getSourceRange());
24522453
else
24532454
noDerivative = true;

lib/Serialization/Deserialization.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4675,11 +4675,9 @@ class swift::TypeDeserializer {
46754675
TypeID typeID;
46764676
bool isVariadic, isAutoClosure, isNonEphemeral, isNoDerivative;
46774677
unsigned rawOwnership;
4678-
decls_block::FunctionParamLayout::readRecord(scratch, labelID, typeID,
4679-
isVariadic, isAutoClosure,
4680-
isNonEphemeral,
4681-
rawOwnership,
4682-
isNoDerivative);
4678+
decls_block::FunctionParamLayout::readRecord(
4679+
scratch, labelID, typeID, isVariadic, isAutoClosure, isNonEphemeral,
4680+
rawOwnership, isNoDerivative);
46834681

46844682
auto ownership =
46854683
getActualValueOwnership((serialization::ValueOwnership)rawOwnership);
@@ -4690,8 +4688,7 @@ class swift::TypeDeserializer {
46904688
if (!paramTy)
46914689
return paramTy.takeError();
46924690

4693-
params.emplace_back(paramTy.get(),
4694-
MF.getIdentifier(labelID),
4691+
params.emplace_back(paramTy.get(), MF.getIdentifier(labelID),
46954692
ParameterTypeFlags(isVariadic, isAutoClosure,
46964693
isNonEphemeral, *ownership,
46974694
isNoDerivative));

0 commit comments

Comments
 (0)