Skip to content

Commit 1c81982

Browse files
committed
Comment and sourcekitd-test fixes
1 parent 6d59776 commit 1c81982

File tree

14 files changed

+28
-22
lines changed

14 files changed

+28
-22
lines changed

test/SourceKit/CompileNotifications/cursor-info.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// COMPILE_1: key.notification: source.notification.compile-did-finish,
99
// COMPILE_1: key.compileid: [[CID1]]
1010
// COMPILE_1: }
11-
// COMPILE_1: <diagnostic "Unable to resolve cursor info.">
11+
// COMPILE_1: <empty cursor info; internal diagnostic: "Unable to resolve cursor info.">
1212
// COMPILE_1-NOT: compile-will-start
1313
// COMPILE_1-NOT: compile-did-finish

test/SourceKit/CursorInfo/cursor_getter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ struct S1 {
2121
// RUN: %sourcekitd-test -req=cursor -pos=3:41 %s -- %s | %FileCheck %s
2222
// RUN: %sourcekitd-test -req=cursor -pos=6:29 %s -- %s | %FileCheck %s
2323
// RUN: %sourcekitd-test -req=cursor -pos=6:31 %s -- %s | %FileCheck %s
24-
// CHECK: <diagnostic "Unable to resolve cursor info.">
24+
// CHECK: <empty cursor info; internal diagnostic: "Unable to resolve cursor info.">

test/SourceKit/CursorInfo/cursor_info.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,17 @@ enum E7: String {
379379
// CHECK22: <decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>availabilityIntroduced</decl.name>()</decl.function.method.instance>
380380

381381
// RUN: %sourcekitd-test -req=cursor -pos=56:15 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK23 %s
382-
// CHECK23: <diagnostic "Unavailable in the current compilation context.">
382+
// CHECK23: <empty cursor info; internal diagnostic: "Unavailable in the current compilation context.">
383383

384384
// RUN: %sourcekitd-test -req=cursor -pos=57:15 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK24 %s
385-
// CHECK24: <diagnostic "Unavailable in the current compilation context.">
385+
// CHECK24: <empty cursor info; internal diagnostic: "Unavailable in the current compilation context.">
386386

387387
// RUN: %sourcekitd-test -req=cursor -pos=58:15 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK25 %s
388388
// CHECK25: <Declaration>func availabilityIntroducedMsg()</Declaration>
389389
// CHECK25: <decl.function.method.instance><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>availabilityIntroducedMsg</decl.name>()</decl.function.method.instance>
390390

391391
// RUN: %sourcekitd-test -req=cursor -pos=59:15 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK26 %s
392-
// CHECK26: <diagnostic "Unavailable in the current compilation context.">
392+
// CHECK26: <empty cursor info; internal diagnostic: "Unavailable in the current compilation context.">
393393

394394
// RUN: %sourcekitd-test -req=cursor -pos=69:14 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK27 %s
395395
// CHECK27: <Declaration>public subscript(i: <Type usr="s:Si">Int</Type>) -&gt; <Type usr="s:Si">Int</Type> { get }</Declaration>

test/SourceKit/CursorInfo/cursor_invalid.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func resyncParser2() {}
4646

4747
// RUN: %sourcekitd-test -req=cursor -pos=7:12 %s -- %s | %FileCheck -check-prefix=DIAG %s
4848
// RUN: %sourcekitd-test -req=cursor -pos=9:7 %s -- %s | %FileCheck -check-prefix=DIAG %s
49-
// DIAG: <diagnostic "Unable to resolve cursor info.">
49+
// DIAG: <empty cursor info; internal diagnostic: "Unable to resolve cursor info.">
5050

5151
// RUN: %sourcekitd-test -req=cursor -pos=18:6 %s -- %s | %FileCheck -check-prefix=EQEQ1 %s
5252
// RUN: %sourcekitd-test -req=cursor -pos=19:6 %s -- %s | %FileCheck -check-prefix=EQEQ1 %s

test/SourceKit/CursorInfo/cursor_unavailable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ find([1,2,3],1)
55
// RUN: %sourcekitd-test -req=cursor -pos=2:1 %s -- %s | %FileCheck -check-prefix=CHECK2 %s
66

77
// CHECK1: source.lang.swift.ref.function.free
8-
// CHECK2: <diagnostic "Resolved to incomplete expression or statement.">
8+
// CHECK2: <empty cursor info; internal diagnostic: "Resolved to incomplete expression or statement.">

test/SourceKit/CursorInfo/cursor_usr.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ func foo(x: FooStruct1) -> S1 {}
2828
// RUN: %sourcekitd-test -req=cursor -usr "s:blahblahblah" %s -- -I %t -F %S/../Inputs/libIDE-mock-sdk %mcp_opt %s | %FileCheck %s -check-prefix=RESOLVE
2929
// Missing s: prefix.
3030
// RUN: %sourcekitd-test -req=cursor -usr "10cursor_usr6globalSivp" %s -- -I %t -F %S/../Inputs/libIDE-mock-sdk %mcp_opt %s | %FileCheck %s -check-prefix=RESOLVE
31-
// RESOLVE: <diagnostic "Unable to resolve type from USR.">
31+
// RESOLVE: <empty cursor info; internal diagnostic: "Unable to resolve type from USR.">
3232

3333
// FIXME: no support for clang USRs.
3434
// RUN: %sourcekitd-test -req=cursor -usr "c:@S@FooStruct1" %s -- -I %t -F %S/../Inputs/libIDE-mock-sdk %mcp_opt %s | %FileCheck %s -check-prefix=CSUPPORT
35-
// CSUPPORT: <diagnostic "Lookup for C/C++/ObjC USRs not implemented.">
35+
// CSUPPORT: <empty cursor info; internal diagnostic: "Lookup for C/C++/ObjC USRs not implemented.">
3636

3737
// RUN: %sourcekitd-test -req=cursor -usr "s:10cursor_usr2S1V" %s -- -I %t -F %S/../Inputs/libIDE-mock-sdk %mcp_opt %s | %FileCheck %s -check-prefix=CHECK1
3838
// CHECK1: source.lang.swift.decl.struct (5:8-5:10)

test/SourceKit/CursorInfo/ignore-llvm-args.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ _ = ""
33
// rdar://problem/38314383
44
// RUN: %sourcekitd-test -req=cursor -offset=0 %s -- -Xllvm -aarch64-use-tbi %s | %FileCheck %s
55

6-
// CHECK: <diagnostic "Resolved to incomplete expression or statement.">
6+
// CHECK: <empty cursor info; internal diagnostic: "Resolved to incomplete expression or statement.">

test/SourceKit/CursorInfo/rdar_18677108-1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Checks that we don't crash.
22
// RUN: %sourcekitd-test -req=cursor -pos=7:5 %s -- %s | %FileCheck %s
3-
// CHECK: <diagnostic "Unable to resolve cursor info.">
3+
// CHECK: <empty cursor info; internal diagnostic: "Unable to resolve cursor info.">
44

55
class CameraViewController
66
{

test/SourceKit/NameTranslation/basic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MyDerived: FooClassDerived {
5656
// RUN: %sourcekitd-test -req=translate -objc-selector fooInstanceFunc01 -pos=23:10 %s -- -F %S/../Inputs/libIDE-mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK5 %s
5757

5858
// CHECK1: FooClassDerived2
59-
// CHECK-DIAG: <diagnostic "Unable to resolve ObjC declaration name.">
59+
// CHECK-DIAG: <empty name translation info; internal diagnostic: "Unable to resolve ObjC declaration name.">
6060
// CHECK2: fooProperty2
6161
// CHECK3: fooInstanceFunc1
6262
// CHECK4: fooBaseInstanceFuncOverridden1

test/SourceKit/NameTranslation/enum.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ func foo1() {
1717
// RUN: %sourcekitd-test -req=translate -objc-name FooRinEnableThird -pos=7:30 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK3 %s
1818

1919
// CHECK1: orderedSome
20-
// CHECK-DIAG: <diagnostic "Unable to resolve ObjC declaration name.">
20+
// CHECK-DIAG: <empty name translation info; internal diagnostic: "Unable to resolve ObjC declaration name.">
2121
// CHECK2: enableThird
2222
// CHECK3: inEnableThird

0 commit comments

Comments
 (0)