Skip to content

Switch to the "Swift" diagnostic style as the default #71722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/Basic/DiagnosticOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class DiagnosticOptions {
bool PrintEducationalNotes = false;

/// Whether to emit diagnostics in the terse LLVM style or in a more
/// descriptive style that's specific to Swift (currently experimental).
FormattingStyle PrintedFormattingStyle = FormattingStyle::LLVM;
/// descriptive style that's specific to Swift.
FormattingStyle PrintedFormattingStyle = FormattingStyle::Swift;

/// Whether to emit macro expansion buffers into separate, temporary files.
bool EmitMacroExpansionFiles = true;
Expand Down
2 changes: 0 additions & 2 deletions lib/AST/NameLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,6 @@ extInfoRemovingThrownError(AnyFunctionType *fnType) {

/// Remove the thrown error type.
static CanType removeThrownError(Type type) {
ASTContext &ctx = type->getASTContext();

return type.transformRec([](TypeBase *type) -> std::optional<Type> {
if (auto funcTy = dyn_cast<FunctionType>(type)) {
if (auto newExtInfo = extInfoRemovingThrownError(funcTy)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
OPT_no_color_diagnostics,
/*Default=*/llvm::sys::Process::StandardErrHasColors());
// If no style options are specified, default to LLVM style.
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::LLVM;
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::Swift;
if (const Arg *arg = Args.getLastArg(OPT_diagnostic_style)) {
StringRef contents = arg->getValue();
if (contents == "llvm") {
Expand Down
3 changes: 0 additions & 3 deletions stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
list(APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-xc++")
endif()

# Use the new diagnostic formatter.
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-diagnostic-style" "swift")

# We should avoid non-literals in format strings, or appropriately mark
# functions.
check_cxx_compiler_flag("-Wformat-nonliteral -Werror=format-nonliteral" CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING)
Expand Down
1 change: 0 additions & 1 deletion stdlib/public/Concurrency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
SWIFT_COMPILE_FLAGS
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
-parse-stdlib
-diagnostic-style swift
${SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS}
${swift_concurrency_options}
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
Expand Down
2 changes: 1 addition & 1 deletion test/CAS/educational-notes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// RUN: not %target-swift-frontend -color-diagnostics -diagnostic-style=llvm -print-educational-notes -diagnostic-documentation-path %S/../diagnostics/test-docs/ \
// RUN: -emit-module -emit-module-path %t/test.module @%t/MyApp.cmd %s 2>&1 | %FileCheck %s --match-full-lines --strict-whitespace
// RUN: not %target-swift-frontend -no-color-diagnostics -print-educational-notes -diagnostic-documentation-path %S/../diagnostics/test-docs/ \
// RUN: not %target-swift-frontend -no-color-diagnostics -diagnostic-style=llvm -print-educational-notes -diagnostic-documentation-path %S/../diagnostics/test-docs/ \
// RUN: -emit-module -emit-module-path %t/test.module @%t/MyApp.cmd %s 2>&1 | %FileCheck %s --match-full-lines --strict-whitespace --check-prefix=NO-COLOR

// A diagnostic with no educational notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ struct InnerTy {

//--- use.swift
func use(s: SomeTy, s2: InnerTy) {}

// Note: extra newlines below ensure that context printing doesn't show the
// lines that we shouldn't see.


// MISSING_HMAP-NOT: cannot find type 'SomeTy' in scope
// MISSING_HMAP: cannot find type 'InnerTy' in scope
// MISSING_HMAP-NOT: cannot find type 'SomeTy' in scope
4 changes: 2 additions & 2 deletions test/ClangImporter/Inputs/custom-modules/ImportAsMember.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ typedef float MNInnerFloat __attribute__((swift_name("IAMMultipleNested.Inner"))
typedef int IAMBadInnerInt
__attribute__((swift_name("IAMNonexistent.Inner")));
// CHECK: ImportAsMember.h:[[@LINE-1]]:{{[0-9]+}}: warning: imported declaration 'IAMBadInnerInt' could not be mapped to 'IAMNonexistent.Inner'
// CHECK: ImportAsMember.h:[[@LINE-2]]:{{[0-9]+}}: note: please report this issue to the owners of 'ImportAsMember'
// CHECK: note: please report this issue to the owners of 'ImportAsMember'
typedef int IAMBadInnerIntAPINotes;
// CHECK: ImportAsMember.h:[[@LINE-1]]:{{[0-9]+}}: warning: imported declaration 'IAMBadInnerIntAPINotes' could not be mapped to 'IAMNonexistent.Inner2'
// CHECK: ImportAsMember.h:[[@LINE-2]]:{{[0-9]+}}: note: please report this issue to the owners of 'ImportAsMember'
// CHECK: note: please report this issue to the owners of 'ImportAsMember'

@interface IAMPrivateParent @end
@interface IAMPrivateChild
Expand Down
14 changes: 7 additions & 7 deletions test/ClangImporter/MixedSource/broken-bridging-header.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// RUN: %empty-directory(%t)
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/fake.h 2>&1 | %FileCheck -check-prefix=MISSING-HEADER %s
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/fake.h -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix=MISSING-HEADER %s

// RUN: cp %S/Inputs/error-on-define.h %t
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s

// RUN: cp %S/Inputs/error-on-define-impl.h %t
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h -Xcc -DERROR 2>&1 | %FileCheck -check-prefix=HEADER-ERROR %s
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h -Xcc -DERROR -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix=HEADER-ERROR %s


// RUN: %target-swift-frontend -emit-module -o %t -module-name HasBridgingHeader %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h
// RUN: %target-swift-frontend -emit-module -o %t -module-name HasBridgingHeader %S/../../Inputs/empty.swift -enable-objc-interop -import-objc-header %t/error-on-define.h -diagnostic-style llvm

// RUN: %target-swift-frontend -typecheck %s -I %t -Xcc -DERROR -verify -show-diagnostics-after-fatal
// RUN: not %target-swift-frontend -typecheck %s -I %t -Xcc -DERROR 2>&1 | %FileCheck -check-prefix=HEADER-ERROR %s
// RUN: not %target-swift-frontend -typecheck %s -I %t -Xcc -DERROR 2>&1 -diagnostic-style llvm | %FileCheck -check-prefix=HEADER-ERROR %s

// RUN: rm %t/error-on-define-impl.h
// RUN: %target-swift-frontend -typecheck %s -I %t -verify -show-diagnostics-after-fatal
// RUN: not %target-swift-frontend -typecheck %s -I %t 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s
// RUN: %target-swift-frontend -typecheck %s -I %t -verify -show-diagnostics-after-fatal -diagnostic-style llvm
// RUN: not %target-swift-frontend -typecheck %s -I %t -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s

import HasBridgingHeader // expected-error {{failed to import bridging header}} expected-error {{failed to load module 'HasBridgingHeader'}}

Expand Down
6 changes: 3 additions & 3 deletions test/ClangImporter/MixedSource/broken-modules.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %empty-directory(%t)

// RUN: not %target-swift-frontend -enable-objc-interop -typecheck %/s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal -o /dev/null 2>&1 | %FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s
// RUN: not %target-swift-frontend -enable-objc-interop -typecheck %/s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal -diagnostic-style llvm -o /dev/null 2>&1 | %FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s

// RUN: not %target-swift-frontend -typecheck %/s -enable-objc-interop -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import -o /dev/null 2>&1 | %FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s
// RUN: not %target-swift-frontend -typecheck %/s -enable-objc-interop -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import -diagnostic-style llvm -o /dev/null 2>&1 | %FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s

// RUN: not %target-swift-frontend -typecheck %s -enable-objc-interop -import-objc-header %S/../../Inputs/empty.swift 2>&1 | %FileCheck -check-prefix=EMPTY-HEADER %s
// RUN: not %target-swift-frontend -typecheck %s -enable-objc-interop -import-objc-header %S/../../Inputs/empty.swift -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix=EMPTY-HEADER %s

// EMPTY-HEADER-NOT: header

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/attr-swift_name.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t.mcp)
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck %s -module-cache-path %t.mcp 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck %s -diagnostic-style llvm -module-cache-path %t.mcp 2>&1 | %FileCheck %s

// REQUIRES: objc_interop

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/diags-with-many-imports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ import Module100
obsoleted()
// CHECK: [[@LINE-1]]:1: error:
// CHECK: explicitly marked unavailable here
// CHECK-NEXT: func obsoleted()
// CHECK: func obsoleted()
10 changes: 5 additions & 5 deletions test/ClangImporter/diags_from_module.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// RUN: %empty-directory(%t)
// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.dia -Xcc -D -Xcc FOO 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.dia -Xcc -D -Xcc FOO -diagnostic-style llvm 2>&1 | %FileCheck %s
// RUN: test -s %t.dia
// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | %FileCheck %s

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.dia -diagnostic-style llvm 2>&1 | %FileCheck %s -check-prefix CHECK-WARN
// RUN: test -s %t.warn.dia
// RUN: c-index-test -read-diagnostics %t.warn.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN


// Also check batch mode (multiple primary files).
// RUN: %empty-directory(%t)
// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.1.dia -serialize-diagnostics-path %t.2.dia -Xcc -D -Xcc FOO 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.1.dia -serialize-diagnostics-path %t.2.dia -Xcc -D -Xcc FOO -diagnostic-style llvm 2>&1 | %FileCheck %s
// RUN: test -s %t.1.dia
// RUN: c-index-test -read-diagnostics %t.1.dia 2>&1 | %FileCheck %s
// RUN: c-index-test -read-diagnostics %t.1.dia 2>&1 | %FileCheck %s -check-prefix CHECK-PRIMARY
// RUN: test -s %t.2.dia
// RUN: c-index-test -read-diagnostics %t.2.dia 2>&1 | %FileCheck %s

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.1.dia -serialize-diagnostics-path %t.warn.2.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.1.dia -serialize-diagnostics-path %t.warn.2.dia -diagnostic-style llvm 2>&1 | %FileCheck %s -check-prefix CHECK-WARN
// RUN: test -s %t.1.dia
// RUN: c-index-test -read-diagnostics %t.warn.1.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-WARN
// RUN: test -s %t.2.dia
Expand All @@ -28,7 +28,7 @@

// Verify that -Wno-* options are applied.
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -Xcc -Wno-#warnings 2>&1 | %FileCheck -check-prefix CHECK-NO-WARN -allow-empty %s
// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -Xcc -Wno-#warnings -diagnostic-style llvm 2>&1 | %FileCheck -check-prefix CHECK-NO-WARN -allow-empty %s

import Module

Expand Down
6 changes: 3 additions & 3 deletions test/ClangImporter/enum-error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func testError() {
let terr = getErr()
switch (terr) { case .TENone, .TEOne, .TETwo: break }
// EXHAUSTIVE: [[@LINE-1]]:{{.+}}: warning: switch covers known cases, but 'TestError.Code' may have additional unknown values
// EXHAUSTIVE: [[@LINE-2]]:{{.+}}: note: handle unknown values using "@unknown default"
// EXHAUSTIVE: {{.+}}: note: handle unknown values using "@unknown default"

switch (terr) { case .TENone, .TEOne: break }
// EXHAUSTIVE: [[@LINE-1]]:{{.+}}: error: switch must be exhaustive
// EXHAUSTIVE: [[@LINE-2]]:{{.+}}: note: add missing case: '.TETwo'
// EXHAUSTIVE: {{.+}}: note: add missing case: '.TETwo'

let _ = TestError.Code(rawValue: 2)!

Expand All @@ -110,7 +110,7 @@ func testError() {

switch eerr { case .EENone, .EEOne: break }
// EXHAUSTIVE: [[@LINE-1]]:{{.+}}: error: switch must be exhaustive
// EXHAUSTIVE: [[@LINE-2]]:{{.+}}: note: add missing case: '.EETwo'
// EXHAUSTIVE: {{.+}}: note: add missing case: '.EETwo'

#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend -enable-objc-interop -swift-version 5 -import-objc-header %S/Inputs/experimental_clang_importer_diagnostics_bridging_header.h -typecheck %s 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -enable-objc-interop -swift-version 5 -import-objc-header %S/Inputs/experimental_clang_importer_diagnostics_bridging_header.h -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s

let s: PartialImport
s.c = 5
Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_diagnostics_cfuncs.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s 2>&1 -diagnostic-style llvm | %FileCheck %s --strict-whitespace

import cfuncs

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_diagnostics_cmacros.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

import macros

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_diagnostics_cstructs.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

import ctypes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-objc-interop -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-objc-interop -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

// REQUIRES: objc_interop

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend -I %S/Inputs/custom-modules -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend -I %S/Inputs/custom-modules -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

// This test tests that requests for diagnosis, performed by name,
// resolve to the correct Clang declarations, even when the same name is used
Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_diagnostics_no_noise.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-objc-interop -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-objc-interop -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

// REQUIRES: objc_interop

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_diagnostics_opt_out.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -disable-experimental-clang-importer-diagnostics -enable-objc-interop -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -disable-experimental-clang-importer-diagnostics -enable-objc-interop -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

// REQUIRES: objc_interop

Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/experimental_eager_diagnostics.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-experimental-eager-clang-module-diagnostics -enable-objc-interop -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -swift-version 5 -enable-experimental-eager-clang-module-diagnostics -enable-objc-interop -typecheck %s -diagnostic-style llvm 2>&1 | %FileCheck %s --strict-whitespace

// REQUIRES: objc_interop

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: split-file %s %t

// RUN: %target-build-swift -module-name CompleteSwiftTypes -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift -diagnostic-style llvm 2>&1 | %FileCheck %s

// REQUIRES: objc_interop

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s -diagnostic-style llvm 2>&1 | %FileCheck %s

// REQUIRES: objc_interop

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -module-name CompleteSwiftTypes -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s

// REQUIRES: objc_interop

Expand Down
Loading