Files
swift-mirror/test/ClangImporter/disable-source-import.swift
Adrian Prantl 046c849949 Add an option to disable ClangImporter imports form source.
This is primarily meant to used for testing LLDB's DWARFImporterDelegate,
however, this could become the default option for LLDB once
DWARFImporterDelegate is sufficiently mature.

<rdar://problem/57880844>
2019-12-16 13:40:21 -08:00

19 lines
672 B
Swift

// RUN: %empty-directory(%t.mcp)
// This should fail only if -disable-clangimporter-source-import is present.
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: -enable-objc-interop -typecheck -I %S/Inputs/custom-modules \
// RUN: -module-cache-path %t.mcp %s | %FileCheck --allow-empty %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: -enable-objc-interop -typecheck -o - -I %S/Inputs/custom-modules \
// RUN: -module-cache-path %t.mcp -disable-clangimporter-source-import %s \
// RUN: 2>&1 | %FileCheck --check-prefix=ERROR %s
import ExternIntX
public let y = x // ERROR: error
// CHECK-NOT: error