<commit_before>/// Test the warning on an SPI import of the public interface of a module.

// RUN: %empty-directory(%t)

/// Compile the SPI lib.
// RUN: %target-swift-frontend -enable-experimental-prespecialization -emit-module %S/Inputs/spi_helper.swift -module-name SPIHelper -emit-module-path %t/SPIHelper.swiftmodule -emit-module-interface-path %t/SPIHelper.swiftinterface -emit-private-module-interface-path %t/SPIHelper.private.swiftinterface -enable-library-evolution -swift-version 5 -parse-as-library

/// Reading from swiftmodule, no warning.
// RUN: %target-swift-frontend -typecheck %s -I %t

/// Reading from .private.swiftinterface, no warning.
// RUN: rm %t/SPIHelper.swiftmodule
// RUN: %target-swift-frontend -typecheck %s -I %t

/// Reading from the public .swiftinterface should produce the warning.
// RUN: rm %t/SPIHelper.private.swiftinterface
// RUN: %target-typecheck-verify-swift -I %t

@_spi(SPIHelper) import SPIHelper // expected-warning {{'@_spi' import of 'SPIHelper' will not include any SPI symbols; 'SPIHelper' was built from the public interface at}}<commit_msg>Fix test case<commit_after>/// Test the warning on an SPI import of the public interface of a module.

// RUN: %empty-directory(%t)

/// Compile the SPI lib.
// RUN: %target-swift-frontend -emit-module %S/Inputs/spi_helper.swift -module-name SPIHelper -emit-module-path %t/SPIHelper.swiftmodule -emit-module-interface-path %t/SPIHelper.swiftinterface -emit-private-module-interface-path %t/SPIHelper.private.swiftinterface -enable-library-evolution -swift-version 5 -parse-as-library

/// Reading from swiftmodule, no warning.
// RUN: %target-swift-frontend -typecheck %s -I %t

/// Reading from .private.swiftinterface, no warning.
// RUN: rm %t/SPIHelper.swiftmodule
// RUN: %target-swift-frontend -typecheck %s -I %t

/// Reading from the public .swiftinterface should produce the warning.
// RUN: rm %t/SPIHelper.private.swiftinterface
// RUN: %target-typecheck-verify-swift -I %t

@_spi(SPIHelper) import SPIHelper // expected-warning {{'@_spi' import of 'SPIHelper' will not include any SPI symbols; 'SPIHelper' was built from the public interface at}}
{'fraction_non_alphanumeric': 0.13132250580046403, 'fraction_numerical': 0.0009280742459396752, 'mean_word_length': 4.0256410256410255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '925354', 'n_tokens_mistral': 687, 'n_tokens_neox': 643, 'n_words': 202}