forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcursor_symbol_graph_referenced_objc.swift
50 lines (47 loc) · 1.61 KB
/
cursor_symbol_graph_referenced_objc.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Foo
struct Parent {
func refObjCType(x: FooStruct1) {}
}
// REQUIRES: objc_interop
// RUN: %sourcekitd-test -req=cursor -pos=4:8 -req-opts=retrieve_symbol_graph=1 %s -- %s -target %target-triple -F %S/../Inputs/libIDE-mock-sdk | %FileCheck -check-prefixes=OBJC %s
// OBJC: SYMBOL GRAPH BEGIN
// OBJC: "declarationFragments": [
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "keyword",
// OBJC-NEXT: "spelling": "func"
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "text",
// OBJC-NEXT: "spelling": " "
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "identifier",
// OBJC-NEXT: "spelling": "refObjCType"
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "text",
// OBJC-NEXT: "spelling": "("
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "externalParam",
// OBJC-NEXT: "spelling": "x"
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "text",
// OBJC-NEXT: "spelling": ": "
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "typeIdentifier",
// OBJC-NEXT: "preciseIdentifier": "[[FooStruct1_USR:.*]]",
// OBJC-NEXT: "spelling": "FooStruct1"
// OBJC-NEXT: },
// OBJC-NEXT: {
// OBJC-NEXT: "kind": "text",
// OBJC-NEXT: "spelling": ")"
// OBJC-NEXT: }
// OBJC-NEXT: ],
// OBJC: SYMBOL GRAPH END
// OBJC: REFERENCED DECLS BEGIN
// OBJC-NEXT: [[FooStruct1_USR]] | public | {{.*}}Foo.h | Foo | User | NonSPI | source.lang.objc
// OBJC-NEXT: FooStruct1 swift.struct [[FooStruct1_USR]]
// OBJC-NEXT: REFERENCED DECLS END