@@ -81,6 +81,12 @@ struct AddOne {
81
81
// CHECK: [[@LINE-5]]:1 | function/Swift | freeLog() | [[FREE_LOG_USR]] | Ref,Call,Impl,RelCall,RelCont
82
82
// CHECK-NEXT: RelCall,RelCont | instance-method/Swift | freeFunc() | [[FREE_FUNC_USR]]
83
83
84
+ func testExpr() {
85
+ #freestandingExpr
86
+ // CHECK: [[@LINE-1]]:3 | function/Swift | exprLog() | [[EXPR_LOG_USR]] | Ref,Call,Impl,RelCall,RelCont
87
+ // CHECK-NEXT: RelCall,RelCont | function/Swift | testExpr()
88
+ }
89
+
84
90
// CHECK: [[@LINE+4]]:40 | macro/Swift | Peer() | [[PEER_USR]] | Ref
85
91
// CHECK: [[@LINE+3]]:23 | macro/Swift | MemberAttribute() | [[MEMBER_ATTRIBUTE_USR]] | Ref
86
92
// CHECK: [[@LINE+2]]:15 | macro/Swift | Member() | [[MEMBER_USR]] | Ref
@@ -112,11 +118,6 @@ struct TestAttached {
112
118
// CHECK: [[@LINE-24]]:39 | function/Swift | peerLog() | [[PEER_LOG_USR]] | Ref,Call,Impl,RelCall,RelCont
113
119
// CHECK-NEXT: RelCall,RelCont | instance-method/Swift | peerFunc() | [[PEER_FUNC_USR]]
114
120
115
- // `Conformance` adds `TestProto` as a conformance on an extension of `TestAttached`
116
- // CHECK: [[@LINE-28]]:1 | extension/ext-struct/Swift | TestAttached | {{.*}} | Def,Impl
117
- // CHECK: [[@LINE-29]]:1 | protocol/Swift | TestProto | [[PROTO_USR]] | Ref,Impl,RelBase
118
- // CHECK-NEXT: RelBase | extension/ext-struct/Swift | TestAttached
119
-
120
121
// CHECK: [[@LINE+1]]:8 | struct/Swift | Outer | [[OUTER_USR:.*]] | Def
121
122
struct Outer {
122
123
// CHECK: [[@LINE+1]]:4 | macro/Swift | PeerMember() | [[PEER_MEMBER_USR]] | Ref
@@ -137,16 +138,19 @@ struct Outer {
137
138
// CHECK: [[@LINE-6]]:16 | function/Swift | memberLog() | [[MEMBER_LOG_USR]] | Ref,Call,Impl,RelCall,RelCont
138
139
// CHECK-NEXT: RelCall,RelCont | instance-method/Swift | memberFunc() | [[INNER_FUNC_USR]]
139
140
141
+
142
+ // Expanded extensions are visited last
143
+
144
+ // `Conformance` adds `TestProto` as a conformance on an extension of `TestAttached`
145
+ // CHECK: [[@LINE-51]]:1 | extension/ext-struct/Swift | TestAttached | {{.*}} | Def,Impl
146
+ // CHECK: [[@LINE-52]]:1 | protocol/Swift | TestProto | [[PROTO_USR]] | Ref,Impl,RelBase
147
+ // CHECK-NEXT: RelBase | extension/ext-struct/Swift | TestAttached
148
+
140
149
// `Conformance` adds `TestProto` as a conformance on an extension of `TestInner`
141
- // CHECK: [[@LINE-10 ]]:3 | extension/ext-struct/Swift | TestInner | {{.*}} | Def,Impl
142
- // CHECK: [[@LINE-11 ]]:3 | protocol/Swift | TestProto | [[PROTO_USR]] | Ref,Impl,RelBase
150
+ // CHECK: [[@LINE-18 ]]:3 | extension/ext-struct/Swift | TestInner | {{.*}} | Def,Impl
151
+ // CHECK: [[@LINE-19 ]]:3 | protocol/Swift | TestProto | [[PROTO_USR]] | Ref,Impl,RelBase
143
152
// CHECK-NEXT: RelBase | extension/ext-struct/Swift | TestInner
144
153
145
- func testExpr() {
146
- #freestandingExpr
147
- // CHECK: [[@LINE-1]]:3 | function/Swift | exprLog() | [[EXPR_LOG_USR]] | Ref,Call,Impl,RelCall,RelCont
148
- // CHECK-NEXT: RelCall,RelCont | function/Swift | testExpr()
149
- }
150
154
151
155
//--- IndexMacros.swift
152
156
import SwiftSyntax
0 commit comments