mirror of
https://github.com/apple/swift.git
synced 2026-10-20 19:13:47 +02:00
The accepted spelling of the official attribute is `@c`. In the fullness of time, it would be confusing that tests for `@c` refer to the old spelling (`@_cdecl`).
22 lines
742 B
Swift
22 lines
742 B
Swift
/// Similar test to cdecl-official but gated to objc-interop compatibility
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %S/c-attr.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
|
|
|
|
/// 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: objc_interop
|