File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
userdocs/diagnostic_groups Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -868,7 +868,7 @@ namespace swift {
868
868
// / Don't emit any remarks
869
869
bool suppressRemarks = false ;
870
870
871
- // / Treat these warnings as errors. Indicies here corespond to DiagID enum
871
+ // / Treat these warnings as errors. Indices here correspond to DiagID enum
872
872
llvm::BitVector warningsAsErrors;
873
873
874
874
// / Whether a fatal error has occurred
@@ -1136,7 +1136,7 @@ namespace swift {
1136
1136
}
1137
1137
1138
1138
// / Apply rules specifing what warnings should or shouldn't be treated as
1139
- // / errors. For group rules the string is either a group name defined by
1139
+ // / errors. For group rules the string is a group name defined by
1140
1140
// / DiagnosticGroups.def
1141
1141
// / Rules are applied in order they appear in the vector.
1142
1142
// / In case the vector contains rules affecting the same diagnostic ID
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ The `availability_deprecated` group covers the following warnings:
25
25
## Usage Example
26
26
27
27
``` sh
28
- swiftc -warning-as-error availability_deprecated file.swift
29
- swiftc -warnings-as-errors -no-warning-as-error availability_deprecated file.swift
28
+ swiftc -Werror availability_deprecated file.swift
29
+ swiftc -warnings-as-errors -Wwarning availability_deprecated file.swift
30
30
```
Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ The deprecated group is a supergroup designed to manage all kinds of warnings re
7
7
## Usage Example
8
8
9
9
``` sh
10
- swiftc -warning-as-error deprecated file.swift
11
- swiftc -warnings-as-errors -no-warning-as-error deprecated file.swift
10
+ swiftc -Werror deprecated file.swift
11
+ swiftc -warnings-as-errors -Wwarning deprecated file.swift
12
12
```
Original file line number Diff line number Diff line change 3
3
The ` unknown_warning_group ` diagnostic group addresses warnings related to the specification of unrecognized warning groups in compilation flags.
4
4
5
5
``` sh
6
- swiftc -warning-as-error non_existing_group file.swift
6
+ swiftc -Werror non_existing_group file.swift
7
7
< unknown> :0: warning: unknown warning group: ' non_existing_group'
8
8
```
9
9
10
10
Such warnings are emitted after the behavior for all specified warning groups has been processed, which means their behavior can also be specified. For example:
11
11
12
12
``` sh
13
- swiftc -warning-as-error unknown_warning_group -warning-as-error non_existing_group file.swift
13
+ swiftc -Werror unknown_warning_group -Werror non_existing_group file.swift
14
14
< unknown> :0: error: unknown warning group: ' non_existing_group'
15
15
```
You can’t perform that action at this time.
0 commit comments