Skip to content

Commit 18b7fdf

Browse files
committed
Fixes for the 5.5 branch
1 parent 7085391 commit 18b7fdf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Sema/DerivedConformanceCodable.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ static EnumDecl *addImplicitCaseCodingKeys(EnumDecl *target,
160160

161161
auto *codingKeyProto = C.getProtocol(KnownProtocolKind::CodingKey);
162162
auto codingKeyType = codingKeyProto->getDeclaredInterfaceType();
163-
TypeLoc protoTypeLoc[1] = {TypeLoc::withoutLoc(codingKeyType)};
164-
ArrayRef<TypeLoc> inherited = C.AllocateCopy(protoTypeLoc);
163+
InheritedEntry protoTypeLoc[1] = {InheritedEntry(TypeLoc::withoutLoc(codingKeyType))};
164+
ArrayRef<InheritedEntry> inherited = C.AllocateCopy(protoTypeLoc);
165165

166166
// Only derive if this case exist in the CodingKeys enum
167167
auto *codingKeyCase =
@@ -222,8 +222,8 @@ static EnumDecl *addImplicitCodingKeys(NominalTypeDecl *target) {
222222
// enum cases based on those var names.
223223
auto *codingKeyProto = C.getProtocol(KnownProtocolKind::CodingKey);
224224
auto codingKeyType = codingKeyProto->getDeclaredInterfaceType();
225-
TypeLoc protoTypeLoc[1] = {TypeLoc::withoutLoc(codingKeyType)};
226-
ArrayRef<TypeLoc> inherited = C.AllocateCopy(protoTypeLoc);
225+
InheritedEntry protoTypeLoc[1] = {InheritedEntry(TypeLoc::withoutLoc(codingKeyType))};
226+
ArrayRef<InheritedEntry> inherited = C.AllocateCopy(protoTypeLoc);
227227

228228
auto *enumDecl = new (C) EnumDecl(SourceLoc(), C.Id_CodingKeys, SourceLoc(),
229229
inherited, nullptr, target);

lib/Sema/DerivedConformanceDifferentiable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ static ValueDecl *deriveDifferentiable_move(DerivedConformance &derived) {
341341
///
342342
/// Precondition: `decl` is a nominal type decl or an extension decl.
343343
void getInheritedProtocols(Decl *decl, SmallPtrSetImpl<ProtocolDecl *> &protos) {
344-
ArrayRef<TypeLoc> inheritedTypeLocs;
344+
ArrayRef<InheritedEntry> inheritedTypeLocs;
345345
if (auto *nominalDecl = dyn_cast<NominalTypeDecl>(decl))
346346
inheritedTypeLocs = nominalDecl->getInherited();
347347
else if (auto *extDecl = dyn_cast<ExtensionDecl>(decl))

0 commit comments

Comments
 (0)