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 {
868868 // / Don't emit any remarks
869869 bool suppressRemarks = false ;
870870
871- // / Treat these warnings as errors. Indicies here corespond to DiagID enum
871+ // / Treat these warnings as errors. Indices here correspond to DiagID enum
872872 llvm::BitVector warningsAsErrors;
873873
874874 // / Whether a fatal error has occurred
@@ -1136,7 +1136,7 @@ namespace swift {
11361136 }
11371137
11381138 // / 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
11401140 // / DiagnosticGroups.def
11411141 // / Rules are applied in order they appear in the vector.
11421142 // / 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:
2525## Usage Example
2626
2727``` 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
3030```
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
77## Usage Example
88
99``` 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
1212```
Original file line number Diff line number Diff line change 33The ` unknown_warning_group ` diagnostic group addresses warnings related to the specification of unrecognized warning groups in compilation flags.
44
55``` sh
6- swiftc -warning-as-error non_existing_group file.swift
6+ swiftc -Werror non_existing_group file.swift
77< unknown> :0: warning: unknown warning group: ' non_existing_group'
88```
99
1010Such warnings are emitted after the behavior for all specified warning groups has been processed, which means their behavior can also be specified. For example:
1111
1212``` 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
1414< unknown> :0: error: unknown warning group: ' non_existing_group'
1515```
You can’t perform that action at this time.
0 commit comments