Skip to content

Commit 2fe6b11

Browse files
authored
Merge pull request #17259 from DougGregor/importer-block-import-comment
[Clang importer] Improve a comment about block types and bridging.
2 parents 84b4efc + 1dab41c commit 2fe6b11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,9 @@ static ImportedType adjustTypeForConcreteImport(
12831283
}
12841284

12851285
// SwiftTypeConverter turns block pointers into @convention(block) types.
1286-
// In a bridgeable context, or in the direct structure of a typedef,
1287-
// we would prefer to instead use the default Swift convention.
1286+
// In some contexts, we bridge them to use the Swift function type
1287+
// representation. This includes typedefs of block types, which use the
1288+
// Swift function type representation.
12881289
if (hint == ImportHint::Block) {
12891290
if (canBridgeTypes(importKind)) {
12901291
// Determine the function type representation we need.

0 commit comments

Comments
 (0)