@@ -34,17 +34,17 @@ namespace swift {
34
34
// Identifier
35
35
// ===----------------------------------------------------------------------===//
36
36
37
- typedef struct BridgedIdentifier {
37
+ struct BridgedIdentifier {
38
38
const void *_Nullable raw;
39
- } BridgedIdentifier ;
39
+ };
40
40
41
41
// ===----------------------------------------------------------------------===//
42
42
// ASTContext
43
43
// ===----------------------------------------------------------------------===//
44
44
45
- typedef struct BridgedASTContext {
45
+ struct BridgedASTContext {
46
46
void *_Nonnull raw;
47
- } BridgedASTContext ;
47
+ };
48
48
49
49
SWIFT_NAME (" BridgedASTContext.getIdentifier(self:_:)" )
50
50
BridgedIdentifier ASTContext_getIdentifier(BridgedASTContext cContext,
@@ -120,10 +120,10 @@ namespace swift {
120
120
121
121
// NOTE: This must be the same underlying value as C++ 'swift::DiagID' defined
122
122
// in 'DiagnosticList.cpp'.
123
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) BridgedDiagID : uint32_t {
123
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedDiagID : uint32_t {
124
124
#define DIAG (KIND, ID, Options, Text, Signature ) BridgedDiagID_##ID,
125
125
#include " swift/AST/DiagnosticsAll.def"
126
- } BridgedDiagID ;
126
+ };
127
127
128
128
class BridgedDiagnosticArgument {
129
129
int64_t storage[3 ];
@@ -159,17 +159,17 @@ class BridgedDiagnosticFixIt {
159
159
};
160
160
161
161
// / Diagnostic severity when reporting diagnostics.
162
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) BridgedDiagnosticSeverity : size_t {
162
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedDiagnosticSeverity : size_t {
163
163
BridgedFatalError,
164
164
BridgedError,
165
165
BridgedWarning,
166
166
BridgedRemark,
167
167
BridgedNote,
168
- } BridgedDiagnosticSeverity ;
168
+ };
169
169
170
- typedef struct BridgedDiagnostic {
170
+ struct BridgedDiagnostic {
171
171
void *_Nonnull raw;
172
- } BridgedDiagnostic ;
172
+ };
173
173
174
174
// FIXME: Can we bridge InFlightDiagnostic?
175
175
void DiagnosticEngine_diagnose (BridgedDiagnosticEngine, BridgedSourceLoc loc,
@@ -239,7 +239,7 @@ BridgedStringRef BridgedVarDecl_getUserFacingName(BridgedVarDecl decl);
239
239
// Misc
240
240
// ===----------------------------------------------------------------------===//
241
241
242
- typedef struct {
242
+ struct BridgedTupleTypeElement {
243
243
BridgedIdentifier Name;
244
244
BridgedSourceLoc NameLoc;
245
245
BridgedIdentifier SecondName;
@@ -248,9 +248,9 @@ typedef struct {
248
248
BridgedSourceLoc ColonLoc;
249
249
BridgedTypeRepr Type;
250
250
BridgedSourceLoc TrailingCommaLoc;
251
- } BridgedTupleTypeElement ;
251
+ };
252
252
253
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) BridgedRequirementReprKind : size_t {
253
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedRequirementReprKind : size_t {
254
254
// / A type bound T : P, where T is a type that depends on a generic
255
255
// / parameter and P is some type that should bound T, either as a concrete
256
256
// / supertype or a protocol to which T must conform.
@@ -266,39 +266,39 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) BridgedRequirementReprKind : size_t {
266
266
267
267
// Note: there is code that packs this enum in a 2-bit bitfield. Audit users
268
268
// when adding enumerators.
269
- } BridgedRequirementReprKind ;
269
+ };
270
270
271
- typedef struct {
271
+ struct BridgedRequirementRepr {
272
272
BridgedSourceLoc SeparatorLoc;
273
273
BridgedRequirementReprKind Kind;
274
274
BridgedTypeRepr FirstType;
275
275
BridgedTypeRepr SecondType;
276
276
// FIXME: Handle Layout Requirements
277
- } BridgedRequirementRepr ;
277
+ };
278
278
279
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) BridgedMacroDefinitionKind : size_t {
279
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedMacroDefinitionKind : size_t {
280
280
// / An expanded macro.
281
281
BridgedExpandedMacro = 0 ,
282
282
// / An external macro, spelled with either the old spelling (Module.Type)
283
283
// / or the new spelling `#externalMacro(module: "Module", type: "Type")`.
284
284
BridgedExternalMacro,
285
285
// / The builtin definition for "externalMacro".
286
286
BridgedBuiltinExternalMacro
287
- } BridgedMacroDefinitionKind ;
287
+ };
288
288
289
289
// / Bridged parameter specifiers
290
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) BridgedAttributedTypeSpecifier : size_t {
290
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedAttributedTypeSpecifier : size_t {
291
291
BridgedAttributedTypeSpecifierInOut,
292
292
BridgedAttributedTypeSpecifierBorrowing,
293
293
BridgedAttributedTypeSpecifierConsuming,
294
294
BridgedAttributedTypeSpecifierLegacyShared,
295
295
BridgedAttributedTypeSpecifierLegacyOwned,
296
296
BridgedAttributedTypeSpecifierConst,
297
297
BridgedAttributedTypeSpecifierIsolated,
298
- } BridgedAttributedTypeSpecifier ;
298
+ };
299
299
300
300
// Bridged type attribute kinds, which mirror TypeAttrKind exactly.
301
- typedef enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedTypeAttrKind : size_t {
301
+ enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedTypeAttrKind : size_t {
302
302
BridgedTypeAttrKind_autoclosure,
303
303
BridgedTypeAttrKind_convention,
304
304
BridgedTypeAttrKind_noescape,
@@ -351,18 +351,18 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(closed) BridgedTypeAttrKind : size_t {
351
351
BridgedTypeAttrKind_thin,
352
352
BridgedTypeAttrKind_thick,
353
353
BridgedTypeAttrKind_Count
354
- } BridgedTypeAttrKind ;
354
+ };
355
355
356
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) ASTNodeKind : size_t {
356
+ enum ENUM_EXTENSIBILITY_ATTR (open) ASTNodeKind : size_t {
357
357
ASTNodeKindExpr,
358
358
ASTNodeKindStmt,
359
359
ASTNodeKindDecl
360
- } ASTNodeKind ;
360
+ };
361
361
362
- typedef struct BridgedASTNode {
362
+ struct BridgedASTNode {
363
363
void *_Nonnull ptr;
364
364
ASTNodeKind kind;
365
- } BridgedASTNode ;
365
+ };
366
366
367
367
struct BridgedIdentifierAndSourceLoc {
368
368
BridgedIdentifier name;
@@ -628,11 +628,11 @@ BridgedExtensionDecl ExtensionDecl_createParsed(
628
628
BridgedNullableTrailingWhereClause genericWhereClause,
629
629
BridgedSourceRange cBraceRange);
630
630
631
- typedef enum ENUM_EXTENSIBILITY_ATTR (closed) {
631
+ enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedOperatorFixity {
632
632
BridgedOperatorFixityInfix,
633
633
BridgedOperatorFixityPrefix,
634
634
BridgedOperatorFixityPostfix,
635
- } BridgedOperatorFixity ;
635
+ };
636
636
637
637
SWIFT_NAME (" BridgedOperatorDecl.createParsed(_:declContext:fixity:"
638
638
" operatorKeywordLoc:name:nameLoc:colonLoc:precedenceGroupName:"
@@ -644,11 +644,11 @@ BridgedOperatorDecl OperatorDecl_createParsed(
644
644
BridgedSourceLoc cColonLoc, BridgedIdentifier cPrecedenceGroupName,
645
645
BridgedSourceLoc cPrecedenceGroupLoc);
646
646
647
- typedef enum ENUM_EXTENSIBILITY_ATTR (closed) {
647
+ enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedAssociativity {
648
648
BridgedAssociativityNone,
649
649
BridgedAssociativityLeft,
650
650
BridgedAssociativityRight,
651
- } BridgedAssociativity ;
651
+ };
652
652
653
653
SWIFT_NAME (" BridgedPrecedenceGroupDecl.createParsed(declContext:"
654
654
" precedencegroupKeywordLoc:name:nameLoc:leftBraceLoc:"
@@ -668,7 +668,7 @@ BridgedPrecedenceGroupDecl PrecedenceGroupDecl_createParsed(
668
668
BridgedSourceLoc cLowerThanKeywordLoc, BridgedArrayRef cLowerThanNames,
669
669
BridgedSourceLoc cRightBraceLoc);
670
670
671
- typedef enum ENUM_EXTENSIBILITY_ATTR (open) {
671
+ enum ENUM_EXTENSIBILITY_ATTR (open) BridgedImportKind {
672
672
BridgedImportKindModule,
673
673
BridgedImportKindType,
674
674
BridgedImportKindStruct,
@@ -677,7 +677,7 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) {
677
677
BridgedImportKindProtocol,
678
678
BridgedImportKindVar,
679
679
BridgedImportKindFunc,
680
- } BridgedImportKind ;
680
+ };
681
681
682
682
SWIFT_NAME (" BridgedImportDecl.createParsed(_:declContext:importKeywordLoc:"
683
683
" importKind:importKindLoc:path:)" )
0 commit comments