mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove `%mcp_opt` from commands that use `%sourcekitd-test` and `%complete-test`, as they are now redundant with the lit substitution.
22 lines
897 B
Swift
22 lines
897 B
Swift
|
|
func test(_ b : BaseInHead) {
|
|
b.doIt(0);
|
|
}
|
|
|
|
// REQUIRES: objc_interop
|
|
// RUN: %swift -typecheck %s -module-name Mixed -import-objc-header %S/Inputs/header.h 2> %t.diags
|
|
// RUN: %FileCheck -input-file %t.diags %s -check-prefix=DIAG
|
|
// DIAG: warning: using the result of an assignment
|
|
|
|
// RUN: %sourcekitd-test -req=cursor -pos=3:7 %s -- %s -module-name Mixed -import-objc-header %S/Inputs/header.h | %FileCheck %s
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %sourcekitd-test -req=cursor -pos=3:7 %s -- %s -module-name Mixed -pch-output-dir %t -import-objc-header %S/Inputs/header.h | %FileCheck %s
|
|
// RUN: stat %t/*.pch
|
|
|
|
// CHECK: source.lang.swift.ref.function.method.instance ({{.*}}Inputs/header.h:4:9-4:23)
|
|
// CHECK: doIt(_:)
|
|
// CHECK: c:objc(cs)BaseInHead(im)doIt:
|
|
// CHECK: (BaseInHead) -> (Int32) -> ()
|
|
// CHECK: <Declaration>func doIt(_ arg: <Type usr="s:s5Int32V">Int32</Type>)</Declaration>
|