content stringlengths 1 103k ⌀ | path stringlengths 8 216 | filename stringlengths 2 179 | language stringclasses 15
values | size_bytes int64 2 189k | quality_score float64 0.5 0.95 | complexity float64 0 1 | documentation_ratio float64 0 1 | repository stringclasses 5
values | stars int64 0 1k | created_date stringdate 2023-07-10 19:21:08 2025-07-09 19:11:45 | license stringclasses 4
values | is_test bool 2
classes | file_hash stringlengths 32 32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\n// Note: make sure we don't get a bogus error from nowhere,\n// error: a declaration cannot be both 'final' and 'dynamic'\nextension NSObject {\n public static l... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_final_dynamic.swift | objc_final_dynamic.swift | Swift | 456 | 0.95 | 0.058824 | 0.333333 | vue-tools | 618 | 2024-09-05T05:06:10.530930 | GPL-3.0 | true | 41714b4e9b51d230ed1d2b2dfba7826c |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module -o %t -I %S/Inputs/custom-modules -enable-objc-interop %s\n// RUN: %target-swift-ide-test -print-module -module-to-print objc_forward_declarations -I %t -I %S/Inputs/custom-modules -enable-objc-interop -enable-upcoming-feature ImportObjcForwardDe... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_forward_declarations.swift | objc_forward_declarations.swift | Swift | 535 | 0.95 | 0.181818 | 0.714286 | react-lib | 587 | 2023-10-23T10:58:53.369095 | BSD-3-Clause | true | c6bfba9afad8e76e62dda885017b694f |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -swift-version 4 -I %S/Inputs/custom-modules %s\n\n// REQUIRES: objc_interop\n\n// Objective-C generic classes can conform to protocols, but for type witnesses\n// (for associated types) cannot depend on the type paramete... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_generics_conformance.swift | objc_generics_conformance.swift | Swift | 1,423 | 0.95 | 0.116279 | 0.15625 | node-utils | 857 | 2024-11-07T14:06:10.276940 | BSD-3-Clause | true | 12cb11608039f0e47728677e91f84c65 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -import-objc-header %S/Inputs/objc_generics_upper_bound.h\n\n// REQUIRES: objc_interop\n\nfunc upperBound(derived: Derived) -> Base<AnyObject> {\n return derived\n}\n\nfunc upperBound(derived: DerivedWithProtocol) -> BaseWithProtocol<a... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_generics_upper_bound.swift | objc_generics_upper_bound.swift | Swift | 515 | 0.95 | 0 | 0.142857 | node-utils | 200 | 2023-11-30T15:35:18.001256 | Apache-2.0 | true | b3784a33abd93126a2b37081a6290dfb |
// RUN: %target-swift-frontend -emit-sil %s -import-objc-header %S/Inputs/ibaction.h -verify\n// REQUIRES: objc_interop\n\nfunc foo(object: ConformsToIBActionInProtocol) {\n object.actionMethod(object)\n}\n | dataset_sample\swift\apple_swift\test\ClangImporter\objc_ibaction.swift | objc_ibaction.swift | Swift | 201 | 0.95 | 0 | 0.4 | vue-tools | 399 | 2024-12-04T18:29:39.558935 | MIT | true | b27d564757fba9351b8323a4b63f7a80 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s\n// REQUIRES: objc_interop\n\nimport Foundation\n\nfunc assertTypeIsAny(_: Any.Protocol) {}\nfunc staticType<T>(_: T) -> T.Type { return T.self }\n\nlet idLover = NSIdLover()\n\nlet t1 = staticType(idLover.makesId())\nassertTypeIsAny(t1... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_id_as_any.swift | objc_id_as_any.swift | Swift | 1,451 | 0.95 | 0.028571 | 0.24 | node-utils | 353 | 2024-03-29T18:59:44.724747 | Apache-2.0 | true | 1e6c5f3ed090598b77c1b348fd9f7d38 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n\n// REQUIRES: objc_interop\n\nimport AppKit\n\nclass X {\n init(withInt: Int) { }\n init(withFloat float: Float) { }\n init(withDouble d: Double) { }\n\n func doSomething(withDouble d: Double) { }\n\n init(_ withString: String) {... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_implicit_with.swift | objc_implicit_with.swift | Swift | 1,840 | 0.95 | 0.032787 | 0.065217 | vue-tools | 347 | 2024-07-04T14:14:51.213345 | BSD-3-Clause | true | 2b023995b1ac34c53b1421fe2bfa3f9c |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify\n\n// REQUIRES: objc_interop\n\nimport AppKit\nimport objc_ext\nimport TestProtocols\nimport ObjCParseExtras\nimport ObjCParseExtrasInitHelper\n\n// rdar://problem/18500201\nextension NSSet {\n convenience in... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init.swift | objc_init.swift | Swift | 6,964 | 0.95 | 0.107623 | 0.122222 | node-utils | 405 | 2024-03-31T22:15:28.379694 | MIT | true | c345385581c08096b138568ac013e221 |
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/objc_init_blocks.h %s -emit-sil -sil-verify-all\n\n// REQUIRES: objc_interop\n\n// rdar://126142109: import an __unsafe_unretained block as zero-initialized.\n//\n// Make sure that the SIL ownership verifier passes.\n// UnsafeUnretainedBlockClass.init()\n// C... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init_blocks.swift | objc_init_blocks.swift | Swift | 848 | 0.95 | 0.111111 | 0.625 | node-utils | 151 | 2023-10-26T10:57:38.187635 | GPL-3.0 | true | a770d574b9b0e82f00a80b99a252d043 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n\n// REQUIRES: objc_interop\n\n// Note: this is in a separate file because -verify doesn't complain\n// about diagnostics from other files.\nimport Foundation\nimport AppKit\n\n// Okay to use an Objective-C-defined initializer to satis... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init_conformance.swift | objc_init_conformance.swift | Swift | 720 | 0.95 | 0.032258 | 0.318182 | python-kit | 574 | 2024-11-23T11:03:09.746114 | MIT | true | 142c7b8cc9de813cc0e5cb4a3fea1f8f |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules -import-objc-header %S/Inputs/objc_init_generics.h %s -verify\n\n// REQUIRES: objc_interop\n\n// expected-no-diagnostics\n\nimport Foundation\n\nclass MyConcreteClass: MyGenericClass<NSObject> {\n // Make sure we don't... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init_generics.swift | objc_init_generics.swift | Swift | 532 | 0.95 | 0.058824 | 0.5 | node-utils | 471 | 2025-02-10T11:02:07.281252 | BSD-3-Clause | true | 4321047f879a6cb346cc87ec4f82d3f3 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -import-objc-header %S/Inputs/objc_init_override_kind.h %s\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\n// rdar://problem/56674158\nclass Derived : Base {\n // This is not flagged as an error, because Base.init() is a\n // convenience in... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init_override_kind.swift | objc_init_override_kind.swift | Swift | 389 | 0.95 | 0.066667 | 0.5 | vue-tools | 707 | 2024-06-14T04:54:03.614768 | Apache-2.0 | true | 2c9dc4b8ad239036430475fa7f7023ec |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules -F %S/Inputs/frameworks) -import-underlying-module -import-objc-header %S/Inputs/objc_init_redundant_bridging.h -emit-sil %s -verify -swift-version 5 -enable-library-evolution\n// RUN: not %target-swift-frontend(mock-sdk: %clang-im... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_init_redundant.swift | objc_init_redundant.swift | Swift | 1,828 | 0.95 | 0.138889 | 0.413793 | vue-tools | 530 | 2024-02-16T12:21:05.436263 | Apache-2.0 | true | fbb6e2bf4c9d3816c8c66d8a5d434da9 |
\n// RUN: %empty-directory(%t)\n// RUN: %build-clang-importer-objc-overlays\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s\n\n// REQUIRES: objc_interop\n// REQUIRES: OS=macosx\n\nimport Obje... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_ir.swift | objc_ir.swift | Swift | 17,034 | 0.95 | 0.068681 | 0.607973 | node-utils | 29 | 2024-03-03T15:39:46.143193 | BSD-3-Clause | true | ea7d6153c73b31f813d0e93ed572c286 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify -strict-concurrency=complete -parse-as-library\n\n// REQUIRES: objc_interop\n// REQUIRES: concurrency\n// REQUIRES: asserts\n\nimport Foundation\nimport ObjCConcurrency\n\n// expected-note@+1 2{{add '@MainAct... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_isolation_complete.swift | objc_isolation_complete.swift | Swift | 1,725 | 0.95 | 0.086207 | 0.204545 | python-kit | 689 | 2024-08-01T10:34:38.531735 | MIT | true | 8e6b552981e965c003839b15d8cd745c |
// RUN: %empty-directory(%t)\n// RUN: split-file %s %t\n\n// RUN: %target-swift-frontend -Xllvm -sil-print-types -emit-silgen %t/main.swift -import-objc-header %t/Test.h | %FileCheck %t/main.swift\n\n// REQUIRES: objc_interop\n// REQUIRES: concurrency\n\n\n// rdar://127520993\n\n//--- Test.h\n#import <Foundation/Founda... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_method_with_sendable_generic_requirement.swift | objc_method_with_sendable_generic_requirement.swift | Swift | 1,626 | 0.95 | 0 | 0.761905 | python-kit | 150 | 2024-03-07T16:36:39.573933 | GPL-3.0 | true | eac5befeabb7b4f9a774ee740ef5ca20 |
// RUN: %empty-directory(%t)\n// RUN: mkdir -p %t/modules\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -module-name MismatchedNames -F %S/Inputs/frameworks -o %t/modules/MismatchedNames.swiftmodule %S/Inputs/frameworks/MismatchedNames.framework/MismatchedNamesSwift.swift\n\n// RUN: %tar... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_mismatched_names.swift | objc_mismatched_names.swift | Swift | 947 | 0.95 | 0 | 0.625 | awesome-app | 678 | 2024-06-21T16:04:53.704813 | BSD-3-Clause | true | a14f9b65e4bdd84b86f600fee0ee2604 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -I %S/Inputs/custom-modules %s -swift-version 4 -verify\n\nimport UnimportableMembers\nimport UnimportableMembersUser\n\nclass IncompleteInitSubclassImplicit : IncompleteDesignatedInitializers { // expected-note 6 {{incorrect ... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_missing_designated_init.swift | objc_missing_designated_init.swift | Swift | 6,501 | 0.95 | 0.152381 | 0.011905 | react-lib | 561 | 2023-11-17T12:23:34.199783 | Apache-2.0 | true | b8708c1dacf62ff3bb759865084b89a8 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -typecheck -parse-as-library -verify %s %S/Inputs/objc_nsmanaged_other.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -typecheck -parse-as-library -verify -primary-file %s %S/Input... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_nsmanagedobject.swift | objc_nsmanagedobject.swift | Swift | 1,799 | 0.95 | 0.067797 | 0.282609 | vue-tools | 99 | 2023-12-01T09:35:56.821110 | MIT | true | e733aa47ab7e30bc0821370d67d95300 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown\n\n// REQUIRES: objc_interop\n\nimport Foundation\nimport ObjCParseExtras\n\nclass MyArray : DummyClass {\n @objc func setBoolProperty(_ x: Bool) { } // expected-error{{method 'setBoolP... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_override.swift | objc_override.swift | Swift | 5,761 | 0.95 | 0.118519 | 0.160377 | awesome-app | 789 | 2024-04-17T13:04:28.508837 | MIT | true | 989a3031a73aeff3dffec958feb20c0f |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -disable-experimental-clang-importer-diagnostics\n\n// REQUIRES: objc_interop\n\nimport AppKit\nimport AVFoundation\n\nimport Newtype\nimport NewtypeSystem\nimport objc_ext\nimport TestProtocols\nimport TypeAn... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_parse.swift | objc_parse.swift | Swift | 27,182 | 0.95 | 0.058741 | 0.156415 | react-lib | 532 | 2025-05-06T21:20:55.180868 | BSD-3-Clause | true | 0b7273750eed47a5bbf0763d2ab5c5f6 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-sil -I %S/Inputs/custom-modules %s -verify > /dev/null\n\n// expected-no-diagnostics\n\n// This file tests the AST verifier, which performs extra checks when there are\n// no errors emitted. Please do not add any.\n\n\nimport ObjCP... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_parse_verifier.swift | objc_parse_verifier.swift | Swift | 415 | 0.95 | 0 | 0.555556 | react-lib | 933 | 2024-10-16T12:18:43.214227 | GPL-3.0 | true | 30ccb33cd1412128208315866bc68619 |
// RUN: %empty-directory(%t)\n\n// FIXME: BEGIN -enable-source-import hackaround\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_protocol_renaming.swift | objc_protocol_renaming.swift | Swift | 1,247 | 0.95 | 0.090909 | 0.625 | node-utils | 525 | 2024-08-16T15:58:57.620306 | MIT | true | 4be9555c4e65676e652cb3d3c7aefb0a |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify\n\n// REQUIRES: objc_interop\n\nimport AppKit\n\nfunc testAnimatorProxy(_ constraint:NSLayoutConstraint) {\n // Rely on warning on 'AnyObject' as an inferred type to check\n // if the result of 'animator' i... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_proxies.swift | objc_proxies.swift | Swift | 398 | 0.95 | 0.076923 | 0.444444 | awesome-app | 33 | 2025-02-06T22:38:11.503698 | MIT | true | 8e2411c798dec3da0e080741ce60280e |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -I %S/Inputs/custom-modules -D ONE_MODULE %s -verify\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -I %S/Inputs/custom-modules -D SUB_MODULE %s -verify\n// RUN: %target-swift-fr... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_redeclared_properties.swift | objc_redeclared_properties.swift | Swift | 2,151 | 0.95 | 0.205128 | 0.322581 | awesome-app | 157 | 2024-03-17T20:33:51.375136 | BSD-3-Clause | true | 411e3fae413bd03d7b54702d93055a13 |
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -F %S/Inputs/frameworks %s 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-PUBLIC %s\n\n// RUN: echo '#import <CategoryOverrides/Private.h>' > %t.h\n// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sd... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_redeclared_properties_categories.swift | objc_redeclared_properties_categories.swift | Swift | 4,246 | 0.95 | 0.107843 | 0.476744 | vue-tools | 348 | 2024-02-02T11:36:27.468020 | GPL-3.0 | true | 526e27ea92b6426969941927bd429a03 |
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -F %S/Inputs/frameworks %s 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-PUBLIC %s\n\n// RUN: echo '#import <PrivatelyReadwrite/Private.h>' > %t.h\n// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-s... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_redeclared_properties_incompatible.swift | objc_redeclared_properties_incompatible.swift | Swift | 5,928 | 0.95 | 0 | 0.487179 | python-kit | 488 | 2024-11-01T15:58:35.914113 | MIT | true | 574f54cb8933c9e92fb9f40d7c6ba670 |
// RUN: %target-swift-frontend -typecheck -enable-objc-interop -disable-objc-attr-requires-foundation-module -I %S/../Inputs/custom-modules %s -verify\n\nimport ObjCRuntimeVisible\n\nextension A {\n @objc func foo() { } // expected-error{{instance method cannot be marked '@objc' because class 'A' is only visible via t... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_runtime_visible.swift | objc_runtime_visible.swift | Swift | 876 | 0.95 | 0.25 | 0.071429 | python-kit | 817 | 2025-01-01T14:37:05.328273 | Apache-2.0 | true | e9cb6f50f56e4a7f52d4c3e51d990244 |
// RUN: %empty-directory(%t)\n// RUN: %build-clang-importer-objc-overlays\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-sil -I %S/Inputs/custom-modules %s -verify\n\n// REQUIRES: objc_interop\n\nimport ObjCSubscripts\n\n// rdar://problem/19772357\nclass KeySubscript1Sub : KeySubs... | dataset_sample\swift\apple_swift\test\ClangImporter\objc_subscript.swift | objc_subscript.swift | Swift | 1,540 | 0.95 | 0.098592 | 0.12069 | react-lib | 639 | 2024-05-28T14:52:20.787536 | GPL-3.0 | true | ecb8f214bc43e6c6df93e843b9b6a5b7 |
\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name optional -I %S/Inputs/custom-modules -Xllvm -sil-print-types -emit-silgen -o - %s | %FileCheck %s\n\n// REQUIRES: objc_interop\n\nimport ObjectiveC\nimport Foundation\nimport objc_ext\nimport TestProtocols\n\nclass A {\n @objc func foo() -> S... | dataset_sample\swift\apple_swift\test\ClangImporter\optional.swift | optional.swift | Swift | 3,911 | 0.95 | 0.036145 | 0.815789 | python-kit | 220 | 2025-06-04T17:49:01.778102 | GPL-3.0 | true | 1c669499e9853478e76f2ca70c1f64ee |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules -DREVERSED %s\n\n// REQUIRES: objc_interop\n\n// Do not import Foundation! This tests indirect vis... | dataset_sample\swift\apple_swift\test\ClangImporter\overlay.swift | overlay.swift | Swift | 864 | 0.95 | 0.047619 | 0.4375 | react-lib | 147 | 2024-07-28T03:00:16.938882 | GPL-3.0 | true | 46ed52dc3b02aba554545091f6df78de |
// RUN: %target-swift-frontend -enable-objc-interop -emit-module %s -sdk %S/Inputs -module-name HasSubmodule -I %S/Inputs/custom-modules -o %t\n\n@_exported import HasSubmodule\n@_exported import HasSubmodule.Submodule\n\nfunc useAnOperator() -> Int {\n var x : Int\n x = 1 + 2 // Forces a lookup of preceden... | dataset_sample\swift\apple_swift\test\ClangImporter\overlay_with_submodule.swift | overlay_with_submodule.swift | Swift | 336 | 0.95 | 0 | 0.125 | vue-tools | 212 | 2023-11-14T13:12:38.243973 | MIT | true | a8e52c3e3b74349b2307e87cf96c6333 |
// RUN: rm -f %t.*\n\n// Generate a bridging PCH, use it in a swift file, and check that the swift file's .swiftdeps\n// mention the .h the PCH was generated from, and any .h files included in it.\n\n// RUN: %target-swift-frontend -emit-pch -o %t.pch %/S/Inputs/chained-unit-test-bridging-header-to-pch.h\n// RUN: %targe... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header-deps-fine.swift | pch-bridging-header-deps-fine.swift | Swift | 2,169 | 0.95 | 0 | 0.947368 | python-kit | 615 | 2025-03-26T04:56:55.377966 | Apache-2.0 | true | 0a7bc6f4a1266fe64f640dcbcbd9840f |
// RUN: rm -f %t.*\n// REQUIRES: objc_interop\n\n// Build a bridging PCH for involving a module map that contains a warning\n// RUN: %target-swift-frontend -F %S/Inputs/ModuleMapWarning -emit-pch %S/Inputs/ModuleMapWarning/bridging-pch.h -pch-output-dir %t/pch 2> %t.stderr\n// RUN: %FileCheck %s < %t.stderr\n\n// CHECK... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header-module-map-diags.swift | pch-bridging-header-module-map-diags.swift | Swift | 679 | 0.95 | 0.076923 | 1 | react-lib | 742 | 2024-10-08T08:19:05.423482 | MIT | true | b6ce068c4257ba9b03650374f52df7b8 |
// RUN: rm -f %t.*\n\n// Check that when a driver is run with -serialize-diagnostics, it picks a .dia location and passes it to the frontend.\n// RUN: %target-swiftc_driver -typecheck %s -enable-bridging-pch -serialize-diagnostics -import-objc-header %S/Inputs/bad-bridging-header.h -driver-print-jobs 2>&1 -diagnostic-s... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header-serialized-diagnostics.swift | pch-bridging-header-serialized-diagnostics.swift | Swift | 1,944 | 0.95 | 0 | 1 | node-utils | 158 | 2023-09-11T14:14:58.742640 | Apache-2.0 | true | 7493fd4cc7d6d9c4381fb9952e197df6 |
//\n// Scenario for this test (this actually occurs in the wild):\n// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//\n// 1. A header for module M, in include-path, that defines @interface Foo\n// and a @protocol Bar that references Foo in one of its methods.\n//\n// 2. A symlink in include-path... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header-vs-modular-interface-defn.swift | pch-bridging-header-vs-modular-interface-defn.swift | Swift | 4,229 | 0.95 | 0.104651 | 0.940476 | vue-tools | 147 | 2023-09-17T22:40:26.100156 | BSD-3-Clause | true | 5079935126202eefd4444bc6057b39df |
// RUN: %empty-directory(%t)\n// RUN: %target-build-swift -emit-module -disable-bridging-pch -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift\n... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header-with-another-bridging-header.swift | pch-bridging-header-with-another-bridging-header.swift | Swift | 1,489 | 0.95 | 0 | 0.875 | awesome-app | 646 | 2025-02-20T20:50:49.016178 | Apache-2.0 | true | 350a3260022a6fcf0358bf3870124ea5 |
// REQUIRES: objc_interop\n// RUN: %empty-directory(%t)\n// RUN: mkdir -p %t/tmp\n\n// First test the explicit frontend-based bridging PCH generation and use works\n// RUN: %target-swift-frontend -emit-pch -o %t/sdk-bridging-header.pch %S/Inputs/sdk-bridging-header.h\n// RUN: %target-typecheck-verify-swift -import-objc... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-bridging-header.swift | pch-bridging-header.swift | Swift | 3,897 | 0.95 | 0.045455 | 0.90566 | python-kit | 812 | 2024-09-12T06:22:07.157646 | MIT | true | 7919dbb9bde2985f13b5eaffd6c05ac0 |
// REQUIRES: objc_interop\n\n// RUN: %empty-directory(%t)\n// RUN: %empty-directory(%t/pch)\n// RUN: split-file %s %t\n\n// Precompile a header into a separate directory and check that it can be\n// loaded via its original header name, even if the header isn't adjacent\n// to the PCH. This used to be the default, but w... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-loaded-from-header-name.swift | pch-loaded-from-header-name.swift | Swift | 702 | 0.95 | 0.043478 | 0.764706 | node-utils | 844 | 2023-10-05T07:57:25.450451 | MIT | true | 1320bce1474cf376f706c5b9b233e7e7 |
// Check that there are no errors printed when trying to load an outdated PCH file\n// rdar://problem/53312911\n\n// RUN: %empty-directory(%t)\n// RUN: cp %S/Inputs/pch-loading-error.h %t/pch-loading-error.h\n// RUN: %target-swift-frontend -parse-as-library -module-name=pch_loading_error -emit-sil %s -enable-objc-inter... | dataset_sample\swift\apple_swift\test\ClangImporter\pch-loading-error.swift | pch-loading-error.swift | Swift | 910 | 0.95 | 0 | 0.769231 | react-lib | 890 | 2023-10-19T13:26:10.535684 | MIT | true | b8b462db3bcec89f55126d132d23488d |
// Emit the explicit module.\n// RUN: %empty-directory(%t)\n// RUN: %target-swift-emit-pcm -module-name script -o %t/script.pcm %S/Inputs/custom-modules/module.modulemap\n\n// Verify some of the output of the -dump-pcm flag.\n// RUN: %swift-dump-pcm %t/script.pcm | %FileCheck %s --check-prefix=CHECK-DUMP\n// CHECK-DUMP... | dataset_sample\swift\apple_swift\test\ClangImporter\pcm-emit-and-import.swift | pcm-emit-and-import.swift | Swift | 678 | 0.95 | 0.066667 | 0.833333 | node-utils | 587 | 2024-12-01T09:25:46.694536 | GPL-3.0 | true | 9ed967de31170fd1571fed0062f9bd48 |
// Emit the explicit module.\n// RUN: %empty-directory(%t)\n// RUN: %swift-frontend -emit-pcm -direct-clang-cc1-module-build -module-name script -o %t/script.pcm %S/Inputs/custom-modules/module.modulemap -Xcc %S/Inputs/custom-modules/module.modulemap -Xcc -o -Xcc %t/script.pcm -Xcc -fmodules -Xcc -triple -Xcc %target-t... | dataset_sample\swift\apple_swift\test\ClangImporter\pcm-emit-direct-cc1-mode.swift | pcm-emit-direct-cc1-mode.swift | Swift | 1,149 | 0.95 | 0.052632 | 0.875 | python-kit | 416 | 2023-10-31T06:41:02.127565 | Apache-2.0 | true | ab8726b886ea60b8b48303c9260d7bfa |
// Emit the explicit system module.\n// RUN: %empty-directory(%t)\n// RUN: %target-swift-emit-pcm -module-name script -Xcc -Xclang -Xcc -emit-module -Xcc -Xclang -Xcc -fsystem-module -o %t/script.pcm %S/Inputs/custom-modules/module.modulemap\n\n// Verify that the input modulemap if marked [System] in the output of the ... | dataset_sample\swift\apple_swift\test\ClangImporter\pcm-emit-system-module.swift | pcm-emit-system-module.swift | Swift | 565 | 0.95 | 0.125 | 0.857143 | react-lib | 322 | 2024-07-12T01:19:36.357713 | BSD-3-Clause | true | a8a4047a276da02adbd153e9652c49fe |
// RUN: %empty-directory(%t)\n\n// FIXME: BEGIN -enable-source-import hackaround\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify -swift-version 6\n\n// REQUIRES: objc_interop\n// REQUIRES: concurrency\n\n@preconcurrency import Foundation\n\nfunc acceptSen... | dataset_sample\swift\apple_swift\test\ClangImporter\predates_concurrency_import_swift6.swift | predates_concurrency_import_swift6.swift | Swift | 458 | 0.95 | 0 | 0.545455 | node-utils | 788 | 2025-05-01T10:27:39.813922 | GPL-3.0 | true | b59ddfdce7e72cbb77609d7db876a534 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules/ %s\n\nimport PredefinedMacros\n\nswift3ReadyToGo()\n | dataset_sample\swift\apple_swift\test\ClangImporter\predefined_macros.swift | predefined_macros.swift | Swift | 157 | 0.95 | 0 | 0.333333 | react-lib | 799 | 2024-04-05T23:19:46.180050 | BSD-3-Clause | true | 0b0a9a1034629341701c412f1ed3d6f9 |
// RUN: %empty-directory(%t)\n// RUN: mkdir -p %t/resources/linux/armv7 %t/sdk/usr/include %t/sdk/usr/lib/swift/linux/armv7\n// RUN: touch %t/sdk/usr/include/{inttypes,stdint,unistd}.h\n\n// RUN: touch %t/resources/linux/armv7/{SwiftGlibc.h,glibc.modulemap}\n// RUN: touch %t/sdk/usr/lib/swift/linux/armv7/{SwiftGlibc.h,... | dataset_sample\swift\apple_swift\test\ClangImporter\print-module-map-paths.swift | print-module-map-paths.swift | Swift | 3,826 | 0.95 | 0.025641 | 1 | react-lib | 300 | 2024-06-27T22:26:57.967460 | Apache-2.0 | true | 4df87fc086b3915390724982e32c7706 |
// REQUIRES: rdar113413583\n\n// RUN: %empty-directory(%t)\n\n// FIXME: BEGIN -enable-source-import hackaround\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sd... | dataset_sample\swift\apple_swift\test\ClangImporter\private_frameworks.swift | private_frameworks.swift | Swift | 4,788 | 0.95 | 0.013889 | 0.588235 | awesome-app | 143 | 2024-01-21T16:31:33.762659 | MIT | true | 0e949e6bb56cb1e719c94ba8c65c3ce2 |
// RUN: %empty-directory(%t)\n\n// FIXME: BEGIN -enable-source-import hackaround\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module... | dataset_sample\swift\apple_swift\test\ClangImporter\private_frameworks_autolink.swift | private_frameworks_autolink.swift | Swift | 861 | 0.95 | 0 | 0.833333 | awesome-app | 631 | 2024-08-24T21:44:20.382469 | Apache-2.0 | true | 42d477048805af60933e55b41108deee |
// RUN: %empty-directory(%t)\n\n// FIXME: BEGIN -enable-source-import hackaround\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module... | dataset_sample\swift\apple_swift\test\ClangImporter\private_frameworks_autolink2.swift | private_frameworks_autolink2.swift | Swift | 887 | 0.95 | 0 | 0.916667 | python-kit | 545 | 2024-11-30T20:55:17.054255 | GPL-3.0 | true | c444c5c04d024221234746361724f024 |
// RUN: %empty-directory(%t)\n\n// RUN: %target-swift-frontend -typecheck -F %S/Inputs/frameworks -DOLD -verify %s -Xcc -w\n// RUN: %target-swift-frontend -typecheck -F %S/Inputs/frameworks -DNEW -verify %s -Xcc -w\n\nimport PrivateAsSubmodule.Private\n\n#if OLD\nimport PrivateAsParallel.Private\n#elseif NEW\nimport Pr... | dataset_sample\swift\apple_swift\test\ClangImporter\private_frameworks_modules.swift | private_frameworks_modules.swift | Swift | 743 | 0.95 | 0.052632 | 0.533333 | react-lib | 965 | 2024-02-12T02:30:53.220722 | MIT | true | b0be0cfe6d518f812ca15d23b973106c |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -enable-objc-interop -emit-module -o %t/a~partial.swiftmodule -I %S/Inputs/custom-modules -module-name TEST -primary-file %s\n// RUN: %target-swift-frontend -enable-objc-interop -emit-module -o %t/test.swiftmodule -I %S/Inputs/custom-modules -module-name TEST... | dataset_sample\swift\apple_swift\test\ClangImporter\protocol-conformance-in-extension.swift | protocol-conformance-in-extension.swift | Swift | 864 | 0.95 | 0.052632 | 0.375 | react-lib | 662 | 2024-01-20T03:09:40.353364 | GPL-3.0 | true | 6efb59d007ecc5bcf7682f9c71187d6e |
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/protocol-member-renaming.h -verify %s\n\n// REQUIRES: objc_interop\n\nclass Modern : NSObject, FooDelegate {\n func foo(_ foo: Foo, willConsume object: Any) {}\n}\n\nclass PreMigration : NSObject, FooDelegate {\n func foo(_ foo: Foo, willConsumeO... | dataset_sample\swift\apple_swift\test\ClangImporter\protocol-member-renaming.swift | protocol-member-renaming.swift | Swift | 641 | 0.95 | 0.176471 | 0.307692 | awesome-app | 232 | 2024-06-09T09:35:36.461827 | BSD-3-Clause | true | 98ecf8792d0fd36d8a3e9ddf40362bc6 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -disable-objc-attr-requires-foundation-module\n\n// REQUIRES: objc_interop\n\nimport ObjectiveC\n\n@objc protocol ObjCProto {}\n@objc protocol ObjCProto2 {}\nprotocol NonObjCProto {}\ntypealias TwoObjCProtos = ObjCProto & ObjCProto2\n\n... | dataset_sample\swift\apple_swift\test\ClangImporter\protocol_metatype_object_conversion.swift | protocol_metatype_object_conversion.swift | Swift | 744 | 0.95 | 0 | 0.166667 | python-kit | 823 | 2025-06-23T11:54:24.843500 | BSD-3-Clause | true | e0fb3008dc897fb19de8f29fb729d3f1 |
// RUN: %empty-directory(%t/src)\n// RUN: split-file %s %t/src\n\n// RUN: %target-swift-frontend -typecheck -disable-objc-attr-requires-foundation-module -import-objc-header %t/src/ObjC.h -O %t/src/main.swift\n\n// REQUIRES: objc_interop\n\n//--- ObjC.h\n\n@interface MyUnit\n@end\n\n__attribute__((swift_name("Metrics.S... | dataset_sample\swift\apple_swift\test\ClangImporter\rdar102564592.swift | rdar102564592.swift | Swift | 545 | 0.95 | 0 | 0.352941 | react-lib | 258 | 2024-12-19T19:45:22.037424 | MIT | true | cc6802eeea772b197dc3d2d2980d825c |
// RUN: %empty-directory(%t)\n// RUN: %target-typecheck-verify-swift -F %S/Inputs/frameworks -module-cache-path %t/mcp1 -target %target-stable-abi-triple\n\n// REQUIRES: objc_interop\n\nimport Module\nimport Module_Private.Sub4\n\n@_objcImplementation extension Module {\n // expected-warning@-1 {{extension for main c... | dataset_sample\swift\apple_swift\test\ClangImporter\rdar123543707.swift | rdar123543707.swift | Swift | 833 | 0.95 | 0.4375 | 0.583333 | react-lib | 137 | 2025-03-26T15:47:30.617767 | Apache-2.0 | true | 66c7574261843ddaafb0287048ee6703 |
// RUN: %target-swift-frontend -typecheck %s -Xcc -Rmodule-import -I %S/Inputs/custom-modules 2>&1 | %FileCheck %s\n\nimport Requires.Swift\n// CHECK-NOT: error\n// CHECK: remark: importing module 'SwiftShims'\n// CHECK: remark: importing module 'Requires'\n | dataset_sample\swift\apple_swift\test\ClangImporter\remarks.swift | remarks.swift | Swift | 252 | 0.95 | 0 | 0.8 | node-utils | 798 | 2023-12-09T02:04:12.156282 | MIT | true | 027403f9a0bb0fa0df0ba338514fa2e1 |
// RUN: %empty-directory(%t)\n// RUN: mkdir -p %t/clang-module-cache\n// RUN: %target-swift-frontend -typecheck -F %S/Inputs/requirement-conflict -module-cache-path %t/clang-module-cache %s\n\n// REQUIRES: objc_interop\n// N.B. technically only need objc_interop here, but CoreFeatures would have to\n// be cross-compile... | dataset_sample\swift\apple_swift\test\ClangImporter\requirement-conflict.swift | requirement-conflict.swift | Swift | 1,476 | 0.95 | 0.178571 | 0.88 | react-lib | 256 | 2023-08-07T11:30:18.782066 | BSD-3-Clause | true | 3b2db329db95f86ba3e266ae90a59a76 |
// RUN: not %target-swift-frontend -typecheck %s -I %S/Inputs/custom-modules -diagnostic-style llvm 2>&1 | %FileCheck %s\n\nimport Requires.Swift // OK\nimport Requires.NotSwift\n// CHECK-NOT: error\n// CHECK: error: module 'Requires.NotSwift' is incompatible with feature 'swift'\n// CHECK-NOT: error\n// CHECK: error: ... | dataset_sample\swift\apple_swift\test\ClangImporter\requires.swift | requires.swift | Swift | 368 | 0.95 | 0 | 0.75 | node-utils | 619 | 2024-03-28T19:00:20.770405 | GPL-3.0 | true | fbdaca39c722ac2784c12169dc9b54ba |
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/restated-protocol-requirement.h %s\n\n// REQUIRES: objc_interop\n\nfunc giveMeAQ(_ q: Q) {\n _ = q.property\n _ = q.method()\n _ = q[q]\n _ = type(of: q).init(foo: q)\n}\n | dataset_sample\swift\apple_swift\test\ClangImporter\restated-protocol-requirement.swift | restated-protocol-requirement.swift | Swift | 237 | 0.95 | 0 | 0.25 | python-kit | 197 | 2024-07-12T03:16:09.875716 | Apache-2.0 | true | 0588ab3bc0d0364feb0aaaa7efbbbbd7 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s -import-underlying-module\n\nvar _ : ScriptTy\nprint(())\n | dataset_sample\swift\apple_swift\test\ClangImporter\script.swift | script.swift | Swift | 166 | 0.95 | 0 | 0.333333 | vue-tools | 854 | 2024-01-31T20:19:21.859223 | MIT | true | fdf25afb1e020061894d9b1b431f34c8 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n\nimport cfuncs\n\nlet array: [UnsafePointer<CChar>?] = [nil]\narray.withUnsafeBufferPointer { nullability_note($0.baseAddress!) }\n | dataset_sample\swift\apple_swift\test\ClangImporter\sdk-apinotes.swift | sdk-apinotes.swift | Swift | 211 | 0.95 | 0 | 0.25 | awesome-app | 111 | 2025-03-28T04:22:59.086146 | GPL-3.0 | true | ad69463579c5f916c035aeca8de52c8a |
// RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/sdk-bridging-header.h\n// RUN: not %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/bad-bridging-header.h 2>&1 | %FileCheck -check-prefix=CHECK-FATAL %s\n\n// RUN: %target-typecheck-verify-swift -Xcc -include -Xcc %S/Inputs/sdk-bridg... | dataset_sample\swift\apple_swift\test\ClangImporter\sdk-bridging-header.swift | sdk-bridging-header.swift | Swift | 1,366 | 0.95 | 0 | 0.625 | react-lib | 922 | 2025-03-13T19:54:51.186274 | Apache-2.0 | true | 226a726cca52707026a7c9fd619cdf5d |
// RUN: rm -rf %t\n// RUN: %target-swift-frontend -typecheck %s\n\n// RUN: %target-swift-frontend -typecheck %S/Inputs/sdk-protocol-class/os1.swift\n// RUN: %target-swift-frontend -typecheck %S/Inputs/sdk-protocol-class/os2.swift\n// RUN: %target-swift-frontend -typecheck %S/Inputs/sdk-protocol-class/os3.swift\n\n// RE... | dataset_sample\swift\apple_swift\test\ClangImporter\sdk-protocol-class.swift | sdk-protocol-class.swift | Swift | 428 | 0.95 | 0.230769 | 0.777778 | node-utils | 803 | 2024-09-03T12:15:51.149375 | MIT | true | 0220a089976fb625b44eacfae79037b9 |
// RUN: %target-typecheck-verify-swift\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\n// Swift and Foundation types should work.\n\nfunc available_Int(_ a: Int) {}\nfunc available_DateFormatter(_ a: DateFormatter) {}\n\n\n// Some traditional Objective-C types should fail with fixits.\n\nfunc unavailable_id(_ a: i... | dataset_sample\swift\apple_swift\test\ClangImporter\sdk.swift | sdk.swift | Swift | 1,047 | 0.95 | 0 | 0.333333 | vue-tools | 596 | 2025-01-16T16:57:13.038675 | BSD-3-Clause | true | 38cae034b70beb8b60df4e010b99e1bf |
// Make sure that Swift's search paths order the same as the corresponding clang flags\n// In particular, they should all come before the default usr/local/include\n\n// RUN: %empty-directory(%t)\n// RUN: split-file %s %t\n\n// RUN: %target-clang -isysroot %t/sdk -I%t/sdk/custom/include -fmodules -fmodules-cache-path=%... | dataset_sample\swift\apple_swift\test\ClangImporter\search-path-order.swift | search-path-order.swift | Swift | 2,049 | 0.95 | 0 | 0.676471 | python-kit | 811 | 2024-05-21T14:04:38.241706 | GPL-3.0 | true | bd6add422fa703ec632bdf4f9f178b68 |
// RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -emit-sil -o /dev/null %s -parse-as-library -enable-experimental-feature SendingArgsAndResults -verify -import-objc-header %S/Inputs/sending.h\n\n// REQUIRES: concurrency\n// REQUIRES: swift_feature_SendingArgsAndResults\n\n/////////////////... | dataset_sample\swift\apple_swift\test\ClangImporter\sending.swift | sending.swift | Swift | 1,568 | 0.95 | 0.025 | 0.40625 | react-lib | 746 | 2024-09-09T05:05:34.438440 | Apache-2.0 | true | bc2233f12143e42d81f2c9332ca2acb1 |
// RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -emit-sil -o /dev/null %s -parse-as-library -verify -import-objc-header %S/Inputs/sending.h\n\n// REQUIRES: concurrency\n// REQUIRES: asserts\n// REQUIRES: objc_interop\n\n////////////////////////\n// MARK: Declarations //\n/////////////////... | dataset_sample\swift\apple_swift\test\ClangImporter\sending_objc.swift | sending_objc.swift | Swift | 2,011 | 0.95 | 0.051724 | 0.333333 | vue-tools | 704 | 2024-06-01T10:23:18.270895 | BSD-3-Clause | true | 309ffa22dcf0bd205ea16080bcf4d8fc |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules -F %S/Inputs/frameworks -sdk "" -enable-objc-interop -disable-objc-attr-requires-foundation-module %S/Inputs/SerializationHelper.swift\n// RUN: %target-swift-frontend -enable-obj... | dataset_sample\swift\apple_swift\test\ClangImporter\serialization-search-paths.swift | serialization-search-paths.swift | Swift | 544 | 0.95 | 0 | 0.3 | vue-tools | 529 | 2024-11-26T20:56:43.037000 | MIT | true | c6dde65dc7d315b8e6863443813a68c3 |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -enable-copy-propagation=requested-passes-only -enable-lexical-lifetimes=false -Xllvm -sil-disable-pass=Simplification -emit-module-path %t/Test.swiftmodule -Xllvm -sil-print-types -emit-sil -o /dev/null -module-name Test %s -sdk "" -import-objc-header %S/Inp... | dataset_sample\swift\apple_swift\test\ClangImporter\serialization-sil.swift | serialization-sil.swift | Swift | 4,229 | 0.95 | 0.106383 | 0.666667 | node-utils | 327 | 2024-04-12T17:25:32.433187 | GPL-3.0 | true | 1ef7499794baec78078f163d6d95fa03 |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift -sdk "" -enable-objc-interop -disable-objc-attr-requires-foundation-module\n// RUN: %target-swift-frontend -enable-objc-interop -typecheck -sd... | dataset_sample\swift\apple_swift\test\ClangImporter\serialization.swift | serialization.swift | Swift | 514 | 0.95 | 0 | 0.375 | python-kit | 526 | 2025-03-26T14:27:47.946815 | GPL-3.0 | true | f90db600394ddb019dc98e84b67429c3 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name main -typecheck -verify %s\n\nimport c_simd\n\nlet char2_value: char2 = makes_char2()\nlet char64_value: char64 = makes_char64()\nlet uchar3_value: uchar3 = makes_uchar3()\nlet uchar32_value: uchar32 = makes_uchar32()\nlet short3_value: short3 =... | dataset_sample\swift\apple_swift\test\ClangImporter\simd.swift | simd.swift | Swift | 3,705 | 0.95 | 0.021053 | 0.067416 | python-kit | 730 | 2025-06-26T19:47:18.006730 | BSD-3-Clause | true | 08e161bf6c67a476fdeca3ffc839b545 |
// RUN: %empty-directory(%t)\n\n// Check if SIL printing+parsing of a clang imported function works.\n\n// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -emit-sil %S/Inputs/static_inline.swift -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h -o %t/static_inline.sil\n// RUN: ... | dataset_sample\swift\apple_swift\test\ClangImporter\static_inline.swift | static_inline.swift | Swift | 884 | 0.95 | 0.105263 | 0.692308 | vue-tools | 14 | 2023-07-17T03:19:27.837350 | BSD-3-Clause | true | a7e9eeceac4445f3a8905317f6df1038 |
// RUN: %empty-directory(%t)\n\n// Try serialization of clang-generated functions.\n\n// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -emit-module %S/Inputs/static_inline.swift -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h -o %t/static_inline.swiftmodule\n// RUN: %target... | dataset_sample\swift\apple_swift\test\ClangImporter\static_inline_serialize.swift | static_inline_serialize.swift | Swift | 845 | 0.95 | 0 | 0.692308 | node-utils | 977 | 2024-05-01T18:19:19.099004 | BSD-3-Clause | true | 6f8848f94d0d6fc3c75f5532b9fcc6cb |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -o - -primary-file %s -I %S/Inputs/custom-modules/\n\n// REQUIRES: objc_interop\n\nimport Foundation\nimport SubclassExistentialsExtra\n\nclass SwiftLaundryService : NSLaundry {\n var g: (Garment & Coat)? = nil\n\n func wash(_ g: Garment... | dataset_sample\swift\apple_swift\test\ClangImporter\subclass_existentials.swift | subclass_existentials.swift | Swift | 1,340 | 0.95 | 0.057692 | 0.171429 | vue-tools | 136 | 2023-11-25T10:56:00.913567 | BSD-3-Clause | true | e1a709d288fe9b6a6dd4a8a13e90d318 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s -swift-version 4\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\nclass SwiftLaundryService : NSLaundry {\n var g: (Garment & Coat)? = nil\n\n func wash(_ g: Garment & Coat) {\n self.g = g\n }\n\n func bleach(_ g: Ga... | dataset_sample\swift\apple_swift\test\ClangImporter\subclass_existentials_ir.swift | subclass_existentials_ir.swift | Swift | 503 | 0.95 | 0.041667 | 0.117647 | python-kit | 301 | 2024-11-27T02:20:07.843047 | MIT | true | 9184bafb96a6d93c1c2befe6f0ede60d |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules/ -enable-objc-interop -import-objc-header %S/Inputs/submodules-bridging-header.h %s\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-pch -... | dataset_sample\swift\apple_swift\test\ClangImporter\submodules-bridging-header.swift | submodules-bridging-header.swift | Swift | 735 | 0.95 | 0 | 0.625 | vue-tools | 933 | 2024-03-07T21:19:38.363316 | BSD-3-Clause | true | 04a2a89a0447354b5207d30310919752 |
// RUN: %empty-directory(%t)\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -DIMPORT_TOP_LEVEL\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module-path %t/submodules.swi... | dataset_sample\swift\apple_swift\test\ClangImporter\submodules.swift | submodules.swift | Swift | 1,066 | 0.95 | 0.068966 | 0.681818 | node-utils | 826 | 2025-02-22T06:47:52.801779 | Apache-2.0 | true | e5ca0576ab195bd143256a4e9f9b26d6 |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -verify -I %S/Inputs/custom-modules/ %s\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -o %t -emit-module -I %S/Inputs/custom-modules/ %s -module-name submodul... | dataset_sample\swift\apple_swift\test\ClangImporter\submodules_indirect.swift | submodules_indirect.swift | Swift | 874 | 0.95 | 0 | 0.7 | python-kit | 800 | 2025-04-30T00:47:42.752864 | Apache-2.0 | true | 0c5857c9078b55dc22466ae6df106b15 |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -DCHECK_SCOPING\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -module-name submodules\n// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(... | dataset_sample\swift\apple_swift\test\ClangImporter\submodules_scoped.swift | submodules_scoped.swift | Swift | 1,045 | 0.95 | 0.041667 | 0.578947 | node-utils | 598 | 2024-08-30T18:11:30.867637 | MIT | true | b241e989ccee62119a7a6a81c00d79a8 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify\n\n// REQUIRES: objc_interop\n\n\nimport Foundation\nimport ImportAsMember.A\nimport AppKit\n\nfunc testOldTypeNames() {\n let _: NSPostingStyle? // expected-error{{'NSPostingStyle' has been renamed to 'Notif... | dataset_sample\swift\apple_swift\test\ClangImporter\swift2_warnings.swift | swift2_warnings.swift | Swift | 4,209 | 0.95 | 0.064815 | 0.216867 | react-lib | 637 | 2023-10-10T01:44:57.504256 | Apache-2.0 | true | c6650bbdfe587d6c755a9677addf0926 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.s... | dataset_sample\swift\apple_swift\test\ClangImporter\swift_modules.swift | swift_modules.swift | Swift | 398 | 0.95 | 0 | 1 | node-utils | 292 | 2025-05-09T01:37:05.363945 | BSD-3-Clause | true | 0b9fec09a439931df7becaee28916056 |
// The clang modules trigger a warning, make sure that -Fsystem/-Isystem have the effect of importing as system, which will suppress the warning.\n\n// RUN: %empty-directory(%t)\n\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -F %S/Inputs/systemsearchpaths/Frameworks -I %S/Inputs/systemsearc... | dataset_sample\swift\apple_swift\test\ClangImporter\system-search-paths.swift | system-search-paths.swift | Swift | 948 | 0.95 | 0.153846 | 0.8 | node-utils | 71 | 2023-12-16T07:01:51.186737 | MIT | true | 30ab1f7fac4474298b4a47834840ac60 |
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -F %S/Inputs/custom-modules %s -verify\nimport TextualHeaders\n | dataset_sample\swift\apple_swift\test\ClangImporter\textual_headers.swift | textual_headers.swift | Swift | 155 | 0.95 | 0 | 0.5 | node-utils | 502 | 2024-03-12T10:36:25.718055 | MIT | true | 887c81f1a40c700fd6ca75652533d7f4 |
// RUN: %target-swift-frontend -enable-objc-interop -import-objc-header %S/Inputs/throwing-mismarked-nonnullable-error.h %s -Xllvm -sil-print-types -emit-sil | %FileCheck %s\n\n// REQUIRES: objc_interop\n\n// Make sure that we do not crash when importing a non-null NSError as\n// throwing. We really just shouldn't expe... | dataset_sample\swift\apple_swift\test\ClangImporter\throwing-mismarked-nonnullable-error.swift | throwing-mismarked-nonnullable-error.swift | Swift | 1,571 | 0.95 | 0.1 | 0.72 | awesome-app | 686 | 2024-07-18T16:10:31.531261 | GPL-3.0 | true | ebcb10db1af6960cdff56f07c959149b |
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/typedef-with-generic-param.h 2>&1\n\n// REQUIRES: OS=macosx\n\ntypealias Handler<T> = (T?, Error?) -> Void\n\nfunc foo<T>(_ handler: Handler<T>?) {}\n\nlet _ = Foo<AnyObject>(completionBlock: foo)\n | dataset_sample\swift\apple_swift\test\ClangImporter\typedef_with_generic_param.swift | typedef_with_generic_param.swift | Swift | 264 | 0.95 | 0 | 0.4 | node-utils | 447 | 2024-06-11T20:49:07.738861 | GPL-3.0 | true | 1caae13ffca93851005f74671b2028b8 |
// RUN: %target-swift-frontend -typecheck %s\n\n// REQUIRES: OS=ios\n// FIXME: this test could use the %clang-importer-sdk, but swift tries to\n// deserialize the real UIKit module and match it up with the mock SDK, and\n// crashes. Another reason to stop using source imports.\n\nimport UIKit\n\n// Check that we drop ... | dataset_sample\swift\apple_swift\test\ClangImporter\uikit_hacks.swift | uikit_hacks.swift | Swift | 831 | 0.95 | 0 | 0.315789 | python-kit | 574 | 2024-04-26T23:42:26.944091 | GPL-3.0 | true | 6ce1773d50bee6630be515590287098b |
// RUN: %swift-ide-test -target x86_64-unknown-windows-msvc -print-module -module-to-print unicode -print-interface -source-filename %s -I %S/Inputs/unicode | %FileCheck %s -check-prefix CHECK-C\n// RUN: %swift-ide-test -target x86_64-unknown-windows-msvc -enable-experimental-cxx-interop -print-module -module-to-print ... | dataset_sample\swift\apple_swift\test\ClangImporter\unicode.swift | unicode.swift | Swift | 594 | 0.95 | 0 | 0.857143 | awesome-app | 865 | 2024-09-17T09:56:46.010342 | GPL-3.0 | true | d677f259e908353ce38b39ba99242880 |
// RUN: %empty-directory(%t)\n// RUN: touch %t/Build.session\n// RUN: %swift %s -typecheck -dump-clang-diagnostics -validate-clang-modules-once -clang-build-session-file %t/Build.session 2>&1 | %FileCheck %s\n\npublic func foo() {}\n\n// CHECK: '-fmodules-validate-once-per-build-session'\n// CHECK: '-fbuild-session-fil... | dataset_sample\swift\apple_swift\test\ClangImporter\validate-modules-once.swift | validate-modules-once.swift | Swift | 316 | 0.8 | 0 | 0.833333 | awesome-app | 821 | 2024-11-24T15:00:16.950434 | BSD-3-Clause | true | f52d4b335b76df441598d012951010af |
// REQUIRES: CODEGENERATOR=AArch64\n// REQUIRES: CODEGENERATOR=ARM\n// REQUIRES: CODEGENERATOR=X86\n\n// RUN: %swift -target i686-unknown-windows-msvc -typecheck %s -parse-stdlib -dump-clang-diagnostics 2>&1 | %FileCheck %s -check-prefix CHECK-X86\n// RUN: %swift -target x86_64-unknown-windows-msvc -typecheck %s -parse... | dataset_sample\swift\apple_swift\test\ClangImporter\windows-sdk-macros.swift | windows-sdk-macros.swift | Swift | 788 | 0.8 | 0 | 1 | node-utils | 692 | 2023-09-03T00:01:02.642379 | MIT | true | 32fdf73568e756e7d3f201ecbe52b41d |
// RUN: %empty-directory(%t/mcp)\n\n// Check that equivalent invocations result in the same module hash\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -Xcc -I -Xcc custom-modules -module-cache-path %t/mcp -Xcc -working-directory -Xcc %S/Inputs/ %s\n// RUN: %target-swift-frontend(mock-sdk: %c... | dataset_sample\swift\apple_swift\test\ClangImporter\working-directory.swift | working-directory.swift | Swift | 1,191 | 0.95 | 0.047619 | 0.857143 | awesome-app | 720 | 2024-04-17T01:52:26.154717 | Apache-2.0 | true | 008ebcd91e223f6e9bf9693f6b841000 |
// RUN: %target-typecheck-verify-swift -swift-version 4\n// RUN: %target-typecheck-verify-swift -swift-version 4.2\n\npublic protocol PublicProto {\n func publicReq()\n}\n\n// expected-note@+1 * {{type declared here}}\ninternal protocol InternalProto {\n func internalReq()\n}\n\nfileprivate protocol FilePrivateProto ... | dataset_sample\swift\apple_swift\test\Compatibility\accessibility.swift | accessibility.swift | Swift | 51,961 | 0.75 | 0.132075 | 0.065278 | vue-tools | 590 | 2024-09-06T01:09:35.944744 | GPL-3.0 | true | ee22e832b996ce4b184639a9b7f291f4 |
// RUN: %target-typecheck-verify-swift -swift-version 4\n\nprivate struct PrivateStruct {} // expected-note 6{{type declared here}}\ninternal struct InternalStruct {} // expected-note 2{{type declared here}}\npublic struct PublicStruct {}\n\npublic protocol BaseProtocol {\n associatedtype T\n}\n\npublic protocol Publi... | dataset_sample\swift\apple_swift\test\Compatibility\accessibility_where.swift | accessibility_where.swift | Swift | 2,339 | 0.95 | 0 | 0.214286 | react-lib | 685 | 2024-05-07T14:49:32.709755 | GPL-3.0 | true | 44e3d246ee8fd36769571d5e6e187f82 |
// RUN: %target-typecheck-verify-swift -swift-version 4\n// RUN: not %target-swift-frontend -typecheck -swift-version 5\n\nprotocol P : class, AnyObject { } // expected-warning{{redundant inheritance from 'AnyObject' and Swift 3 'class' keyword}}{{14-21=}}\n\n | dataset_sample\swift\apple_swift\test\Compatibility\anyobject_class.swift | anyobject_class.swift | Swift | 255 | 0.8 | 0.4 | 0.666667 | python-kit | 774 | 2024-10-28T05:15:06.734481 | GPL-3.0 | true | 01d7fc46357e72df65bdc9567e3de8bd |
// RUN: %target-swift-frontend -swift-version 4 -emit-sil -verify %s | %FileCheck %s\n\ndo {\n func a(_ x: @autoclosure () -> Int) {}\n func b(_ x: Int, _ f: @autoclosure () -> Int = #line) {}\n\n func c(_ y: @autoclosure () -> Int, _ z: Int) {\n // CHECK: function_ref @$s16attr_autoclosure1aL_yySiyXKF\n a(y)\... | dataset_sample\swift\apple_swift\test\Compatibility\attr_autoclosure.swift | attr_autoclosure.swift | Swift | 1,852 | 0.95 | 0.028169 | 0.175439 | node-utils | 434 | 2023-12-12T15:08:26.119047 | BSD-3-Clause | true | f7d4d5ea9947ad15ccccc3e9b6788e48 |
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 -enable-objc-interop -disable-objc-attr-requires-foundation-module\n// RUN: %target-swift-frontend -typecheck %s -swift-version 4 -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-testing\n// RUN: %target-swift-frontend -typecheck %s... | dataset_sample\swift\apple_swift\test\Compatibility\attr_inlinable_dynamic.swift | attr_inlinable_dynamic.swift | Swift | 1,643 | 0.95 | 0.1 | 0.470588 | vue-tools | 183 | 2023-07-28T20:58:42.576898 | BSD-3-Clause | true | 28cda80e6747ce12ffec0d899d7fd579 |
// RUN: %target-typecheck-verify-swift -swift-version 4.2\n// RUN: %target-typecheck-verify-swift -swift-version 4.2 -enable-testing\n// RUN: %target-typecheck-verify-swift -swift-version 4.2 -enable-library-evolution\n// RUN: %target-typecheck-verify-swift -swift-version 4.2 -enable-library-evolution -enable-testing\n... | dataset_sample\swift\apple_swift\test\Compatibility\attr_inlinable_swift42.swift | attr_inlinable_swift42.swift | Swift | 1,196 | 0.95 | 0.083333 | 0.2 | python-kit | 523 | 2023-12-20T21:48:08.094473 | Apache-2.0 | true | bed55caf85aac0f53792f81351dc68af |
// RUN: %target-typecheck-verify-swift -swift-version 4\n\n// No diagnostics at all in Swift 4.0 mode.\n\nprivate typealias PrivateAlias = Int\n\ninternal typealias InternalAlias = Int\n\n@usableFromInline typealias UsableFromInlineAlias = Int\n\npublic typealias PublicAlias = Int\n\n@inlinable public func f() {\n _ =... | dataset_sample\swift\apple_swift\test\Compatibility\attr_inlinable_typealias_swift4.swift | attr_inlinable_typealias_swift4.swift | Swift | 412 | 0.8 | 0 | 0.166667 | python-kit | 61 | 2024-12-24T04:09:07.178052 | GPL-3.0 | true | be551df6346d23bae35364b8778f0643 |
// RUN: %target-typecheck-verify-swift -swift-version 4.2\n\n// Only warnings in Swift 4.2 mode.\n\nprivate typealias PrivateAlias = Int\n// expected-note@-1 {{type alias 'PrivateAlias' is not '@usableFromInline' or public}}\n\ninternal typealias InternalAlias = Int\n// expected-note@-1 {{type alias 'InternalAlias' is ... | dataset_sample\swift\apple_swift\test\Compatibility\attr_inlinable_typealias_swift42.swift | attr_inlinable_typealias_swift42.swift | Swift | 833 | 0.95 | 0.08 | 0.375 | python-kit | 510 | 2025-04-11T02:30:02.643002 | MIT | true | a0d7980fbf1cb72e439e6d426e0bbfe2 |
// RUN: %target-typecheck-verify-swift -swift-version 4\n\n@override // expected-error {{'override' can only be specified on class members}} {{1-11=}} expected-error {{'override' is a declaration modifier, not an attribute}} {{1-2=}}\nfunc virtualAttributeCanNotBeUsedInSource() {}\n\nclass MixedKeywordsAndAttributes { ... | dataset_sample\swift\apple_swift\test\Compatibility\attr_override.swift | attr_override.swift | Swift | 17,297 | 0.95 | 0.113379 | 0.073239 | python-kit | 611 | 2024-02-25T21:54:46.883930 | MIT | true | 30a793486701c3fb25c0c94875efc248 |
// RUN: %target-swift-frontend -swift-version 4 -Xllvm -sil-print-types -emit-silgen %s -verify | %FileCheck %s\n\nclass Base {\n var foo: Int { return 0 } // expected-note {{attempt to override property here}}\n var bar: Int = 0 // expected-note {{attempt to override property here}}\n}\n\nclass Sub : Base {\n lazy ... | dataset_sample\swift\apple_swift\test\Compatibility\attr_override_lazy.swift | attr_override_lazy.swift | Swift | 1,180 | 0.95 | 0.12 | 0.5 | vue-tools | 652 | 2025-03-04T19:08:36.665662 | Apache-2.0 | true | 6f02ee5c60f87fd68b705a03ddc19715 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.