@@ -226,8 +226,9 @@ void *SimpleIdentTypeRepr_create(void *ctx, void *loc, BridgedIdentifier id) {
226
226
DeclNameRef (Identifier::getFromOpaquePointer (id)));
227
227
}
228
228
229
-
230
- void *GenericIdentTypeRepr_create (void *ctx, BridgedIdentifier name, void *nameLoc, BridgedArrayRef genericArgs, void *lAngle, void *rAngle) {
229
+ void *GenericIdentTypeRepr_create (void *ctx, BridgedIdentifier name,
230
+ void *nameLoc, BridgedArrayRef genericArgs,
231
+ void *lAngle, void *rAngle) {
231
232
ASTContext &Context = *static_cast <ASTContext *>(ctx);
232
233
auto Loc = DeclNameLoc (getSourceLocFromPointer (nameLoc));
233
234
auto Name = DeclNameRef (Identifier::getFromOpaquePointer (name));
@@ -268,8 +269,9 @@ void NominalTypeDecl_setMembers(void *decl, BridgedArrayRef members) {
268
269
((NominalTypeDecl *)decl)->addMember (m);
269
270
}
270
271
271
- DeclContextAndDecl StructDecl_create (
272
- void *ctx, void *loc, BridgedIdentifier name, void *nameLoc, void *_Nullable genericParams, void *dc) {
272
+ DeclContextAndDecl StructDecl_create (void *ctx, void *loc,
273
+ BridgedIdentifier name, void *nameLoc,
274
+ void *_Nullable genericParams, void *dc) {
273
275
ASTContext &Context = *static_cast <ASTContext *>(ctx);
274
276
auto *out = new (Context) StructDecl (getSourceLocFromPointer (loc),
275
277
Identifier::getFromOpaquePointer (name),
@@ -310,7 +312,9 @@ void *ArrayTypeRepr_create(void *ctx, void *base, void *lsquareLoc, void *rsquar
310
312
return new (Context) ArrayTypeRepr ((TypeRepr *)base, SourceRange{lSquareLoc, rSquareLoc});
311
313
}
312
314
313
- void *DictionaryTypeRepr_create (void *ctx, void *keyType, void *valueType, void *lsquareLoc, void *colonloc, void *rsquareLoc) {
315
+ void *DictionaryTypeRepr_create (void *ctx, void *keyType, void *valueType,
316
+ void *lsquareLoc, void *colonloc,
317
+ void *rsquareLoc) {
314
318
ASTContext &Context = *static_cast <ASTContext *>(ctx);
315
319
SourceLoc lSquareLoc = getSourceLocFromPointer (lsquareLoc);
316
320
SourceLoc colonLoc = getSourceLocFromPointer (colonloc);
@@ -367,7 +371,9 @@ void *CompositionTypeRepr_create(void *ctx, BridgedArrayRef types, void *firstTy
367
371
return CompositionTypeRepr::create (Context, getArrayRef<TypeRepr *>(types), firstType, SourceRange{});
368
372
}
369
373
370
- void *FunctionTypeRepr_create (void *ctx, void *argsTy, void *_Nullable asyncLoc, void *_Nullable throwsLoc, void *arrowLoc, void *returnType) {
374
+ void *FunctionTypeRepr_create (void *ctx, void *argsTy, void *_Nullable asyncLoc,
375
+ void *_Nullable throwsLoc, void *arrowLoc,
376
+ void *returnType) {
371
377
ASTContext &Context = *static_cast <ASTContext *>(ctx);
372
378
return new (Context) FunctionTypeRepr (nullptr ,
373
379
(TupleTypeRepr *)argsTy,
@@ -391,25 +397,27 @@ void *ExistentialTypeRepr_create(void *ctx, void *anyLoc, void *baseTy) {
391
397
return new (Context) ExistentialTypeRepr (getSourceLocFromPointer (anyLoc), (TypeRepr *)baseTy);
392
398
}
393
399
394
- void *GenericParamList_create (void *ctx, void *lAngleLoc, BridgedArrayRef params, void *_Nullable whereLoc, BridgedArrayRef reqs, void *rAngleLoc) {
400
+ void *GenericParamList_create (void *ctx, void *lAngleLoc,
401
+ BridgedArrayRef params, void *_Nullable whereLoc,
402
+ BridgedArrayRef reqs, void *rAngleLoc) {
395
403
ASTContext &Context = *static_cast <ASTContext *>(ctx);
396
404
SmallVector<RequirementRepr> requirements;
397
405
for (auto req : getArrayRef<BridgedRequirementRepr>(reqs)) {
398
406
switch (req.Kind ) {
399
407
case BridgedRequirementReprKindTypeConstraint:
400
- requirements.push_back (
401
- RequirementRepr::getTypeConstraint ((TypeRepr *)req.FirstType ,
402
- getSourceLocFromPointer (req.SeparatorLoc ),
403
- (TypeRepr *)req.SecondType ));
404
- break ;
408
+ requirements.push_back (
409
+ RequirementRepr::getTypeConstraint ((TypeRepr *)req.FirstType ,
410
+ getSourceLocFromPointer (req.SeparatorLoc ),
411
+ (TypeRepr *)req.SecondType ));
412
+ break ;
405
413
case BridgedRequirementReprKindSameType:
406
- requirements.push_back (
407
- RequirementRepr::getSameType ((TypeRepr *)req.FirstType ,
408
- getSourceLocFromPointer (req.SeparatorLoc ),
409
- (TypeRepr *)req.SecondType ));
410
- break ;
414
+ requirements.push_back (
415
+ RequirementRepr::getSameType ((TypeRepr *)req.FirstType ,
416
+ getSourceLocFromPointer (req.SeparatorLoc ),
417
+ (TypeRepr *)req.SecondType ));
418
+ break ;
411
419
case BridgedRequirementReprKindLayoutConstraint:
412
- llvm_unreachable (" cannot handle layout constraints!" );
420
+ llvm_unreachable (" cannot handle layout constraints!" );
413
421
}
414
422
}
415
423
return GenericParamList::create (Context,
@@ -420,7 +428,10 @@ void *GenericParamList_create(void *ctx, void *lAngleLoc, BridgedArrayRef params
420
428
getSourceLocFromPointer (rAngleLoc));
421
429
}
422
430
423
- void *GenericTypeParamDecl_create (void *ctx, void *declContext, BridgedIdentifier name, void *nameLoc, void *_Nullable ellipsisLoc, long index, bool isParameterPack) {
431
+ void *GenericTypeParamDecl_create (void *ctx, void *declContext,
432
+ BridgedIdentifier name, void *nameLoc,
433
+ void *_Nullable ellipsisLoc, long index,
434
+ bool isParameterPack) {
424
435
return GenericTypeParamDecl::createParsed (static_cast <DeclContext *>(declContext),
425
436
Identifier::getFromOpaquePointer (name),
426
437
getSourceLocFromPointer (nameLoc),
@@ -437,8 +448,10 @@ void GenericTypeParamDecl_setInheritedType(void *ctx, void *Param, void *ty) {
437
448
((GenericTypeParamDecl *)Param)->setInherited (entries);
438
449
}
439
450
440
-
441
- DeclContextAndDecl TypeAliasDecl_create (void *ctx, void *declContext, void *aliasLoc, void *equalLoc, BridgedIdentifier name, void *nameLoc, void *_Nullable genericParams) {
451
+ DeclContextAndDecl TypeAliasDecl_create (void *ctx, void *declContext,
452
+ void *aliasLoc, void *equalLoc,
453
+ BridgedIdentifier name, void *nameLoc,
454
+ void *_Nullable genericParams) {
442
455
ASTContext &Context = *static_cast <ASTContext *>(ctx);
443
456
auto *out = new (Context) TypeAliasDecl (getSourceLocFromPointer (aliasLoc),
444
457
getSourceLocFromPointer (equalLoc),
0 commit comments