Skip to content

Commit 5b5a3e3

Browse files
committed
Point at diagnostic group documentation on docs.swift.org
1 parent ccce10d commit 5b5a3e3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ static void configureDiagnosticEngine(
26362636
std::string docsPath = Options.DiagnosticDocumentationPath;
26372637
if (docsPath.empty()) {
26382638
// Point at the latest Markdown documentation on GitHub.
2639-
docsPath = "https://github.com/swiftlang/swift/tree/main/userdocs/diagnostics";
2639+
docsPath = "https://docs.swift.org/compiler/documentation/diagnostics";
26402640
}
26412641
Diagnostics.setDiagnosticDocumentationPath(docsPath);
26422642

test/diagnostics/diagnostic-group-serialization.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func f() { }
1010

1111
func g() {
1212
f()
13-
// CHECK: [[@LINE-1]]:3: warning: 'f()' is deprecated: please do not use [-W{{.*}}deprecated-declaration.md] [DeprecatedDeclaration]
13+
// CHECK: [[@LINE-1]]:3: warning: 'f()' is deprecated: please do not use [-W{{.*}}deprecated-declaration] [DeprecatedDeclaration]
1414
}
1515

1616

@@ -19,7 +19,7 @@ func beCareful() { }
1919

2020
func test() {
2121
beCareful()
22-
// CHECK: [[@LINE-1]]:3: warning: expression uses unsafe constructs but is not marked with 'unsafe' [-W{{.*}}strict-memory-safety.md] [StrictMemorySafety]
22+
// CHECK: [[@LINE-1]]:3: warning: expression uses unsafe constructs but is not marked with 'unsafe' [-W{{.*}}strict-memory-safety] [StrictMemorySafety]
2323
}
2424

25-
// CHECK: [StrictMemorySafety]: <{{.*}}strict-memory-safety.md>
25+
// CHECK: [StrictMemorySafety]: <{{.*}}strict-memory-safety>

test/diagnostics/educational_notes_serialization.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
typealias Fn = () -> ()
99
extension Fn {}
10-
// CHECK: [[@LINE-1]]:1: error: non-nominal type 'Fn' (aka '() -> ()') cannot be extended [{{.*}}nominal-types.md] [NominalTypes]
10+
// CHECK: [[@LINE-1]]:1: error: non-nominal type 'Fn' (aka '() -> ()') cannot be extended [{{.*}}nominal-types] [NominalTypes]
1111

1212

1313
// Shares the flag record with `Fn`
1414
typealias Dup = () -> ()
1515
extension Dup {}
16-
// CHECK: [[@LINE-1]]:1: error: non-nominal type 'Dup' (aka '() -> ()') cannot be extended [{{.*}}nominal-types.md] [NominalTypes]
16+
// CHECK: [[@LINE-1]]:1: error: non-nominal type 'Dup' (aka '() -> ()') cannot be extended [{{.*}}nominal-types] [NominalTypes]
1717

1818
do {
1919
func noNote(_: Int) {}

test/diagnostics/print-diagnostic-groups.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend -typecheck %s 2>&1 | %FileCheck %s --check-prefix=CHECK-FILE -check-prefix CHECK
2-
// RUN: %target-swift-frontend -typecheck %s -diagnostic-documentation-path https://www.swift.org/documentation/compiler/diagnostics/ 2>&1 | %FileCheck %s --check-prefix=CHECK-HTTPS -check-prefix CHECK
2+
// RUN: %target-swift-frontend -typecheck %s -diagnostic-documentation-path https://docs.swift.org/compiler/documentation/diagnostics/ 2>&1 | %FileCheck %s --check-prefix=CHECK-HTTPS -check-prefix CHECK
33
// REQUIRES: swift_swift_parser
44

55
// CHECK: warning: file 'print-diagnostic-groups.swift' is part of module 'main'; ignoring import{{$}}
@@ -16,4 +16,4 @@ bar()
1616

1717
// CHECK-FILE: [#DeprecatedDeclarations]: <file://{{.*}}deprecated-declaration.md>
1818

19-
// CHECK-HTTPS: [#DeprecatedDeclaration]: <https://www.swift.org/documentation/compiler/diagnostics/deprecated-declaration.md>
19+
// CHECK-HTTPS: [#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>

0 commit comments

Comments
 (0)