mirror of
https://github.com/apple/swift.git
synced 2026-09-30 10:17:34 +02:00
Since basically forever (2014) ClangImporter has stripped type aliases from imported builtin types (CInt, CDouble, CUnsignedInt etc.). The reasoning for this is lost to time, but the working theory is that it was because of some limitation in the compiler back then. We no longer need to do this, and this change indeed makes it so that we don't. Letting the interop type aliases show up in diagnostics and module interfaces should help users writing more portable code.
260 lines
5.5 KiB
Plaintext
260 lines
5.5 KiB
Plaintext
public func doSomethingInHead(_ arg: CInt)
|
|
open class BaseInHead {
|
|
|
|
open func doIt(_ arg: CInt)
|
|
}
|
|
/// Awesome name.
|
|
/// �������
|
|
/// Awesome name.
|
|
open class SameName {
|
|
}
|
|
public protocol SameNameProtocol {
|
|
}
|
|
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 0,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 7,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 12,
|
|
key.length: 17
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 30,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 32,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.typeidentifier,
|
|
key.offset: 37,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 43,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 48,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 54,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 72,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 77,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 82,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 87,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 89,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.typeidentifier,
|
|
key.offset: 94,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.doccomment,
|
|
key.offset: 102,
|
|
key.length: 18
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.doccomment,
|
|
key.offset: 120,
|
|
key.length: 26
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.doccomment,
|
|
key.offset: 146,
|
|
key.length: 18
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 164,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 169,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 175,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 188,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 195,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 204,
|
|
key.length: 16
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.ref.typealias,
|
|
key.offset: 37,
|
|
key.length: 4,
|
|
key.is_system: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.typealias,
|
|
key.offset: 94,
|
|
key.length: 4,
|
|
key.is_system: 1
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.decl.function.free,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "doSomethingInHead(_:)",
|
|
key.offset: 7,
|
|
key.length: 35,
|
|
key.nameoffset: 12,
|
|
key.namelength: 30,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 0,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
}
|
|
],
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.parameter,
|
|
key.name: "arg",
|
|
key.offset: 30,
|
|
key.length: 11,
|
|
key.typename: "CInt"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.accessibility: source.lang.swift.accessibility.open,
|
|
key.name: "BaseInHead",
|
|
key.offset: 48,
|
|
key.length: 53,
|
|
key.nameoffset: 54,
|
|
key.namelength: 10,
|
|
key.bodyoffset: 66,
|
|
key.bodylength: 34,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 43,
|
|
key.length: 4,
|
|
key.attribute: source.decl.attribute.open
|
|
}
|
|
],
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.accessibility: source.lang.swift.accessibility.open,
|
|
key.name: "doIt(_:)",
|
|
key.offset: 77,
|
|
key.length: 22,
|
|
key.nameoffset: 82,
|
|
key.namelength: 17,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 72,
|
|
key.length: 4,
|
|
key.attribute: source.decl.attribute.open
|
|
}
|
|
],
|
|
key.substructure: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.parameter,
|
|
key.name: "arg",
|
|
key.offset: 87,
|
|
key.length: 11,
|
|
key.typename: "CInt"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.class,
|
|
key.accessibility: source.lang.swift.accessibility.open,
|
|
key.name: "SameName",
|
|
key.offset: 169,
|
|
key.length: 18,
|
|
key.nameoffset: 175,
|
|
key.namelength: 8,
|
|
key.bodyoffset: 185,
|
|
key.bodylength: 1,
|
|
key.docoffset: 102,
|
|
key.doclength: 62,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 164,
|
|
key.length: 4,
|
|
key.attribute: source.decl.attribute.open
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.protocol,
|
|
key.accessibility: source.lang.swift.accessibility.public,
|
|
key.name: "SameNameProtocol",
|
|
key.offset: 195,
|
|
key.length: 29,
|
|
key.nameoffset: 204,
|
|
key.namelength: 16,
|
|
key.bodyoffset: 222,
|
|
key.bodylength: 1,
|
|
key.attributes: [
|
|
{
|
|
key.offset: 188,
|
|
key.length: 6,
|
|
key.attribute: source.decl.attribute.public
|
|
}
|
|
]
|
|
}
|
|
]
|