Skip to content

Commit d5b3132

Browse files
committed
PrintAsObjc Test: Test compatibility headers for C
1 parent 384b030 commit d5b3132

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

test/PrintAsObjC/cdecl-imports.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -parse-as-library -typecheck -verify -emit-objc-header-path %t/swift.h
33
// RUN: %FileCheck %s < %t/swift.h
44
// RUN: %check-in-clang %t/swift.h
5+
// RUN: %check-in-clang-c %t/swift.h
56
// RUN: %check-in-clang-cxx %t/swift.h
67

78
// REQUIRES: objc_interop

test/PrintAsObjC/cdecl.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %FileCheck %s < %t/cdecl.h
55
// RUN: %check-in-clang %t/cdecl.h
66
// RUN: %check-in-clang -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
7+
// RUN: %check-in-clang-c -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
78
// RUN: %check-in-clang-cxx -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
89

910
// REQUIRES: objc_interop

test/PrintAsObjC/lit.local.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ config.substitutions.insert(0, ('%check-in-clang',
1010
'-I %%clang-include-dir '
1111
'-isysroot %r/Inputs/clang-importer-sdk' % config.test_source_root) )
1212

13+
config.substitutions.insert(0, ('%check-in-clang-c',
14+
'%%clang -fsyntax-only -x c-header -std=c99 -fobjc-arc -fmodules '
15+
'-fmodules-validate-system-headers '
16+
'-Weverything -Werror -Wno-unused-macros -Wno-incomplete-module '
17+
'-Wno-auto-import '
18+
'-F %%clang-importer-sdk-path/frameworks '
19+
'-I %%clang-include-dir '
20+
'-isysroot %r/Inputs/clang-importer-sdk' % config.test_source_root) )
21+
1322
config.substitutions.insert(0, ('%check-in-clang-cxx',
1423
'%%clang -fsyntax-only -x objective-c++-header -std=c++17 '
1524
'-fobjc-arc -fmodules -fmodules-validate-system-headers '

0 commit comments

Comments
 (0)