PrintAsObjc Test: Test compatibility headers for C

This commit is contained in:
Alexis Laferrière
2025-04-10 15:42:47 -07:00
parent 384b0302c2
commit d5b31328cd
3 changed files with 11 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -parse-as-library -typecheck -verify -emit-objc-header-path %t/swift.h
// RUN: %FileCheck %s < %t/swift.h
// RUN: %check-in-clang %t/swift.h
// RUN: %check-in-clang-c %t/swift.h
// RUN: %check-in-clang-cxx %t/swift.h
// REQUIRES: objc_interop

View File

@@ -4,6 +4,7 @@
// RUN: %FileCheck %s < %t/cdecl.h
// RUN: %check-in-clang %t/cdecl.h
// RUN: %check-in-clang -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
// RUN: %check-in-clang-c -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
// RUN: %check-in-clang-cxx -fno-modules -Qunused-arguments %t/cdecl.h -include ctypes.h -include CoreFoundation.h
// REQUIRES: objc_interop

View File

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