Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/Interop/Cxx/objc-correctness/Inputs/POSIX.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
typedef unsigned int __uint32_t;
typedef unsigned int u_int32_t;
typedef __uint32_t in_addr_t;

struct in_addr {
in_addr_t s_addr;
};

#define INADDR_ANY (u_int32_t)0x00000000
4 changes: 4 additions & 0 deletions test/Interop/Cxx/objc-correctness/Inputs/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ module NSTextCheckingResult {
header "NSTextCheckingResult.h"
requires objc
}

module MockPOSIX {
header "POSIX.h"
}
6 changes: 6 additions & 0 deletions test/Interop/Cxx/objc-correctness/posix.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=swift-5.9 %s
// REQUIRES: objc_interop

import MockPOSIX

let _ = in_addr(s_addr: INADDR_ANY)