File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -251,13 +251,13 @@ class C10 {
251
251
func meth( _ x: Int , withFloat: Float ) { }
252
252
}
253
253
254
- // CHECK: var <Var>c10</Var> = <Ctor@[[@LINE-4]]:3-Class@[[@LINE-5]]:7>C10</Ctor>(<Ctor@[[@LINE-4]]:3>int</Ctor>: 0, <Ctor@[[@LINE-4]]:3>andThis</Ctor>: 0)
254
+ // CHECK: var <Var>c10</Var> = <Ctor@[[@LINE-4]]:3-Class@[[@LINE-5]]:7>C10</Ctor>(<Ctor@[[@LINE-4]]:3#int >int</Ctor>: 0, <Ctor@[[@LINE-4]]:3#andThis >andThis</Ctor>: 0)
255
255
var c10 = C10 ( int: 0 , andThis: 0 )
256
- // CHECK: <Var@[[@LINE-1]]:5>c10</Var>.<Func@[[@LINE-5]]:8>meth</Func>(0, <Func@[[@LINE-5]]:8>withFloat</Func>: 0)
256
+ // CHECK: <Var@[[@LINE-1]]:5>c10</Var>.<Func@[[@LINE-5]]:8>meth</Func>(0, <Func@[[@LINE-5]]:8#withFloat >withFloat</Func>: 0)
257
257
c10. meth ( 0 , withFloat: 0 )
258
258
259
259
func test7( int x: Int , andThis y: Float ) { }
260
- // CHECK: <Func@[[@LINE-1]]:6>test7</Func>(<Func@[[@LINE-1]]:6>int</Func>: 0, <Func@[[@LINE-1]]:6>andThis</Func>: 0)
260
+ // CHECK: <Func@[[@LINE-1]]:6>test7</Func>(<Func@[[@LINE-1]]:6#int >int</Func>: 0, <Func@[[@LINE-1]]:6#andThis >andThis</Func>: 0)
261
261
test7 ( int: 0 , andThis: 0 )
262
262
263
263
func test8< T : Prot2 > ( _ x: T ) { }
Original file line number Diff line number Diff line change @@ -1113,6 +1113,7 @@ class AnnotationPrinter : public SourceEntityWalker {
1113
1113
ValueDecl *Dcl = nullptr ;
1114
1114
TypeDecl *CtorTyRef = nullptr ;
1115
1115
ModuleEntity Mod;
1116
+ Identifier ArgName;
1116
1117
bool IsRef = true ;
1117
1118
1118
1119
SemanticSourceEntity (CharSourceRange Range,
@@ -1128,6 +1129,14 @@ class AnnotationPrinter : public SourceEntityWalker {
1128
1129
ModuleEntity Mod)
1129
1130
: Range(Range),
1130
1131
Mod(Mod) {}
1132
+
1133
+ SemanticSourceEntity (CharSourceRange Range,
1134
+ ValueDecl *Dcl,
1135
+ Identifier argName)
1136
+ : Range(Range),
1137
+ Dcl(Dcl),
1138
+ ArgName(argName),
1139
+ IsRef(true ) {}
1131
1140
};
1132
1141
1133
1142
bool walkToDeclPre (Decl *D, CharSourceRange Range) override {
@@ -1151,7 +1160,7 @@ class AnnotationPrinter : public SourceEntityWalker {
1151
1160
1152
1161
bool visitCallArgName (Identifier Name, CharSourceRange Range,
1153
1162
ValueDecl *D) override {
1154
- annotateSourceEntity ({ Range, D, nullptr , /* IsRef= */ true });
1163
+ annotateSourceEntity ({ Range, D, Name });
1155
1164
return true ;
1156
1165
}
1157
1166
@@ -1228,6 +1237,9 @@ class AnnotationPrinter : public SourceEntityWalker {
1228
1237
OS << ' i' ;
1229
1238
OS << " Mod" ;
1230
1239
}
1240
+ if (!Entity.ArgName .empty ()) {
1241
+ OS << " #" << Entity.ArgName .str ();
1242
+ }
1231
1243
1232
1244
OS << ' >' ;
1233
1245
OS << Text;
You can’t perform that action at this time.
0 commit comments