Skip to content

Commit aef00fb

Browse files
[test] Add crasher test for Clang type serialization.
1 parent 77201c0 commit aef00fb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
typedef struct {
2+
int x;
3+
} PlaceholderType;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: not --crash %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -enable-testing -module-name NonModularApp -emit-module -o %t/NonModularApp.swiftmodule -import-objc-header %S/Inputs/non-modular-header.h -DNON_MODULAR_APP -use-clang-function-types 2>&1 | %FileCheck %s
3+
4+
// CHECK: Clang function type is not serializable
5+
6+
#if NON_MODULAR_APP
7+
import ctypes
8+
struct S {
9+
static func f(_ : @convention(c, cType: "void (*)(PlaceholderType, size_t)") (PlaceholderType, Int) -> ()) {}
10+
}
11+
#endif

0 commit comments

Comments
 (0)