Skip to content

Commit e3c2162

Browse files
committed
Cope with change to default diagnostic style
1 parent a51a172 commit e3c2162

14 files changed

+34
-20
lines changed

test/ClangImporter/attr-swift_name.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t.mcp)
2-
// 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
2+
// 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
33

44
// REQUIRES: objc_interop
55

test/ClangImporter/diags-with-many-imports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ import Module100
108108
obsoleted()
109109
// CHECK: [[@LINE-1]]:1: error:
110110
// CHECK: explicitly marked unavailable here
111-
// CHECK-NEXT: func obsoleted()
111+
// CHECK: func obsoleted()

test/Macros/top_level_freestanding.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// RUN: %target-typecheck-verify-swift -swift-version 5 -parse-as-library -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -DIMPORT_MACRO_LIBRARY -swift-version 5 %S/Inputs/top_level_freestanding_other.swift -I %t
1414

1515
// Check diagnostic buffer names
16-
// RUN: not %target-swift-frontend -typecheck -swift-version 5 -parse-as-library -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -swift-version 5 %s %S/Inputs/top_level_freestanding_other.swift 2> %t.diags
16+
// RUN: not %target-swift-frontend -typecheck -swift-version 5 -parse-as-library -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -swift-version 5 %s %S/Inputs/top_level_freestanding_other.swift -diagnostic-style llvm 2> %t.diags
1717
// RUN: %FileCheck -check-prefix DIAG_BUFFERS %s < %t.diags
1818

1919
// Execution testing

test/Misc/fatal_error.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: not %target-swift-frontend -typecheck %s -sdk %t 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=NO-MODULE %s
4-
// RUN: not %target-swift-frontend -typecheck %s -resource-dir %t -sdk %t 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=NO-STDLIB %s
3+
// RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm %s -sdk %t 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=NO-MODULE %s
4+
// RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm %s -resource-dir %t -sdk %t 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=NO-STDLIB %s
55

66
// NO-MODULE: error: no such module 'NonExistent'
77

test/ModuleInterface/ModuleCache/module-cache-diagnostics.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
// CHECK-ERROR: LeafModule.swiftinterface:7:8: error: no such module 'NotAModule'
6565
// CHECK-ERROR: OtherModule.swiftinterface:4:8: error: failed to build module 'LeafModule' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
6666
// CHECK-ERROR: module-cache-diagnostics.swift:{{[0-9]+}}:8: error: failed to build module 'OtherModule' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
67-
// CHECK-ERROR-NOT: error:
6867
//
6968
//
7069
// Next test: same as above, but with a .dia file
@@ -89,7 +88,6 @@
8988
// CHECK-ERROR-INLINE: LeafModule.swiftinterface:6:33: error: cannot find 'unresolved' in scope
9089
// CHECK-ERROR-INLINE: OtherModule.swiftinterface:4:8: error: failed to build module 'LeafModule' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
9190
// CHECK-ERROR-INLINE: module-cache-diagnostics.swift:{{[0-9]+}}:8: error: failed to build module 'OtherModule' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
92-
// CHECK-ERROR-INLINE-NOT: error:
9391
//
9492
//
9593
// Next test: same as above, but with a .dia file

test/ModuleInterface/loading-remarks.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ import DirectMixedDependency
5454
// CHECK: remark: loaded module 'Swift'; source: '{{.*}}Swift.swiftmodule{{.*}}.swiftinterface', loaded: '{{.*}}Swift.swiftmodule{{.*}}.swiftmodule'
5555
// CHECK: remark: 'SwiftDependency' has a required transitive dependency on 'Swift'
5656
// CHECK: remark: loaded module 'SwiftDependency'; source: '{{.*}}SwiftDependency.swiftinterface', loaded: '{{.*}}SwiftDependency-{{.*}}.swiftmodule'
57-
// CHECK: remark: loaded module 'SwiftNonResilientDependency'; source: '{{.*}}SwiftNonResilientDependency.swiftmodule', loaded: '{{.*}}SwiftNonResilientDependency.swiftmodule'
58-
// CHECK: remark: loaded module 'IndirectMixedDependency' (overlay for a clang dependency); source: '{{.*}}IndirectMixedDependency.swiftinterface', loaded: '{{.*}}IndirectMixedDependency-{{.*}}.swiftmodule'
59-
// CHECK: remark: loaded module 'DirectMixedDependency'; source: '{{.*}}module.modulemap', loaded: '{{.*}}DirectMixedDependency-{{.*}}.pcm'
57+
// CHECK-DAG: remark: loaded module 'SwiftNonResilientDependency'; source: '{{.*}}SwiftNonResilientDependency.swiftmodule', loaded: '{{.*}}SwiftNonResilientDependency.swiftmodule'
58+
// CHECK-DAG: remark: loaded module 'IndirectMixedDependency' (overlay for a clang dependency); source: '{{.*}}IndirectMixedDependency.swiftinterface', loaded: '{{.*}}IndirectMixedDependency-{{.*}}.swiftmodule'
59+
// CHECK-DAG: remark: loaded module 'DirectMixedDependency'; source: '{{.*}}module.modulemap', loaded: '{{.*}}DirectMixedDependency-{{.*}}.pcm'

test/ModuleInterface/unbuildable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ import UnbuildableFuture
3232
// FUTURE: unbuildable.swift:[[@LINE-1]]:8: error: failed to build module 'UnbuildableFuture'; this SDK is not supported by the compiler (the SDK is built with 'NeoTokyoSwift 2000.42', while this compiler is '{{.*Swift version.*}}'). Please select a toolchain which matches the SDK.
3333
#endif
3434

35-
// CURRENT-VERIFY: UnbuildableCurrent.swiftinterface:1:1: error: failed to verify module interface of 'UnbuildableCurrent' due to the errors above; the textual interface may be broken by project issues or a compiler bug
36-
// FUTURE-VERIFY: UnbuildableFuture.swiftinterface:1:1: error: failed to verify module interface of 'UnbuildableFuture' due to the errors above; the textual interface may be broken by project issues, differences between compilers (the producer 'NeoTokyoSwift 2000.42' and this compiler '{{.*Swift version.*}}') or a compiler bug
35+
// CURRENT-VERIFY: UnbuildableCurrent.swiftinterface:{{.*:.*}}: error: failed to verify module interface of 'UnbuildableCurrent' due to the errors above; the textual interface may be broken by project issues or a compiler bug
36+
// FUTURE-VERIFY: UnbuildableFuture.swiftinterface:{{.*:.*}}: error: failed to verify module interface of 'UnbuildableFuture' due to the errors above; the textual interface may be broken by project issues, differences between compilers (the producer 'NeoTokyoSwift 2000.42' and this compiler '{{.*Swift version.*}}') or a compiler bug

test/NameLookup/nonempty-brace-in-brace.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ public struct Foo {
99

1010
private extension String {}
1111

12+
13+
14+
15+
1216
// CHECK-NO-ASSERTION-NOT: Assertion

test/NameLookup/scope_map_lookup_extension_extension.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
// RUN: not %target-swift-frontend -typecheck %s 2> %t.errors
33
// RUN: %FileCheck %s <%t.errors
44
// CHECK-NOT: Program arguments:
5+
6+
// Note: extra newlines below ensure that context printing doesn't show the
7+
// CHECK-NOT line.
8+
9+
10+
11+
512
private extension String {
613
private extension String

test/Parse/diagnostic_points_to_first_bad_token.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not %target-swift-frontend -typecheck %s 2>&1 | %FileCheck -strict-whitespace %s
1+
// RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm %s 2>&1 | %FileCheck -strict-whitespace %s
22

33
// Test the diagnostic option 'PointsToFirstBadToken'.
44

0 commit comments

Comments
 (0)