mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ASTPrinter: Qualify names when printing nested declarations.
That is, if you have this declaration:
struct Outer {
struct Inner {
// ...
}
}
and you're just printing 'Inner', print it like this:
struct Outer.Inner {
// ...
}
This comes up with the ClangImporter's import-as-member feature, and
is also about to affect how error code enums are imported as well.
This is currently only enabled in certain contexts: always when
printing interfaces, and for types (but not other members) when
printing declarations for Quick Help.
rdar://problem/28208090
This commit is contained in:
@@ -1159,7 +1159,7 @@ func genfoo<T1, T2>(x ix: T1, y iy: T2) where T1 : Prot, T2 : cake.C1, T1.Elemen
|
||||
key.usr: "s:4cake2C1C7Elementa",
|
||||
key.offset: 24,
|
||||
key.length: 23,
|
||||
key.fully_annotated_decl: "<decl.typealias><syntaxtype.keyword>typealias</syntaxtype.keyword> <decl.name>Element</decl.name> = <ref.struct usr=\"s:Si\">Int</ref.struct></decl.typealias>",
|
||||
key.fully_annotated_decl: "<decl.typealias><syntaxtype.keyword>typealias</syntaxtype.keyword> <ref.class usr=\"s:4cake2C1C\">C1</ref.class>.<decl.name>Element</decl.name> = <ref.struct usr=\"s:Si\">Int</ref.struct></decl.typealias>",
|
||||
key.conforms: [
|
||||
{
|
||||
key.kind: source.lang.swift.ref.protocol,
|
||||
@@ -1701,7 +1701,7 @@ func genfoo<T1, T2>(x ix: T1, y iy: T2) where T1 : Prot, T2 : cake.C1, T1.Elemen
|
||||
key.usr: "s:4cake2S1V2SEO",
|
||||
key.offset: 1089,
|
||||
key.length: 63,
|
||||
key.fully_annotated_decl: "<decl.enum><syntaxtype.keyword>enum</syntaxtype.keyword> <decl.name>SE</decl.name></decl.enum>",
|
||||
key.fully_annotated_decl: "<decl.enum><syntaxtype.keyword>enum</syntaxtype.keyword> <ref.struct usr=\"s:4cake2S1V\">S1</ref.struct>.<decl.name>SE</decl.name></decl.enum>",
|
||||
key.entities: [
|
||||
{
|
||||
key.kind: source.lang.swift.decl.enumelement,
|
||||
@@ -1778,7 +1778,7 @@ func genfoo<T1, T2>(x ix: T1, y iy: T2) where T1 : Prot, T2 : cake.C1, T1.Elemen
|
||||
key.usr: "s:4cake2S2V1Ta",
|
||||
key.offset: 1238,
|
||||
key.length: 21,
|
||||
key.fully_annotated_decl: "<decl.typealias><syntaxtype.keyword>typealias</syntaxtype.keyword> <decl.name>T</decl.name> = <ref.struct usr=\"s:4cake2S2V\">S2</ref.struct></decl.typealias>",
|
||||
key.fully_annotated_decl: "<decl.typealias><syntaxtype.keyword>typealias</syntaxtype.keyword> <ref.struct usr=\"s:4cake2S2V\">S2</ref.struct>.<decl.name>T</decl.name> = <ref.struct usr=\"s:4cake2S2V\">S2</ref.struct></decl.typealias>",
|
||||
key.conforms: [
|
||||
{
|
||||
key.kind: source.lang.swift.ref.protocol,
|
||||
|
||||
Reference in New Issue
Block a user