mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This matches the current behavior in `ImportResolution`. The change refactors an existing utility function to do this check from `UnboundImport` to a common utility used now also in the scanner.
11 lines
552 B
Swift
11 lines
552 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/clang-module-cache)
|
|
|
|
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -module-name TautologicalModule -verify
|
|
// Check the contents of the JSON output
|
|
// RUN: %validate-json %t/deps.json | %FileCheck %s
|
|
|
|
import TautologicalModule // expected-warning {{file 'tautological_import.swift' is part of module 'TautologicalModule'; ignoring import}}
|
|
|
|
// CHECK: "mainModuleName": "TautologicalModule"
|