PrintAsObjC Test: Extract what needs Objective-C out of cdecl-official

This commit is contained in:
Alexis Laferrière
2025-04-18 13:20:32 -07:00
parent bcbdfeeb43
commit a55b190be2
2 changed files with 24 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
/// Similar test to cdecl-official but gated to objc-interop compatibility
// RUN: %empty-directory(%t)
// RUN: split-file %S/cdecl-official.swift %t --leading-lines
/// Generate cdecl.h
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: %t/Lib.swift -emit-module -verify -o %t -emit-module-doc \
// RUN: -emit-clang-header-path %t/cdecl.h \
// RUN: -enable-experimental-feature CDecl
/// Check cdecl.h directly
// RUN: %check-in-clang %t/cdecl.h
// RUN: %check-in-clang-cxx %t/cdecl.h
/// Build an Objective-C client against cdecl.h
// RUN: %clang -c %t/Client.c -fmodules -I %t \
// RUN: -F %S/../Inputs/clang-importer-sdk-path/frameworks \
// RUN: -I %clang-include-dir -Werror \
// RUN: -isysroot %S/../Inputs/clang-importer-sdk
// REQUIRES: swift_feature_CDecl
// REQUIRES: objc_interop

View File

@@ -4,14 +4,12 @@
/// Generate cdecl.h
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: %t/Lib.swift -emit-module -verify -o %t -emit-module-doc \
// RUN: -emit-objc-header-path %t/cdecl.h \
// RUN: -emit-clang-header-path %t/cdecl.h \
// RUN: -enable-experimental-feature CDecl
/// Check cdecl.h directly
// RUN: %FileCheck %s --input-file %t/cdecl.h
// RUN: %check-in-clang %t/cdecl.h
// RUN: %check-in-clang-c %t/cdecl.h -Wnullable-to-nonnull-conversion
// RUN: %check-in-clang-cxx %t/cdecl.h
/// Build a client against cdecl.h
// RUN: %clang -c %t/Client.c -fmodules -I %t \