Skip to content
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/AST/DiagnosticEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ namespace swift {
/// Don't emit any remarks
bool suppressRemarks = false;

/// Treat these warnings as errors. Indicies here corespond to DiagID enum
/// Treat these warnings as errors. Indices here correspond to DiagID enum
llvm::BitVector warningsAsErrors;

/// Whether a fatal error has occurred
Expand Down Expand Up @@ -1136,7 +1136,7 @@ namespace swift {
}

/// Apply rules specifing what warnings should or shouldn't be treated as
/// errors. For group rules the string is either a group name defined by
/// errors. For group rules the string is a group name defined by
/// DiagnosticGroups.def
/// Rules are applied in order they appear in the vector.
/// In case the vector contains rules affecting the same diagnostic ID
Expand Down
4 changes: 2 additions & 2 deletions userdocs/diagnostic_groups/availability_deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ The `availability_deprecated` group covers the following warnings:
## Usage Example

```sh
swiftc -warning-as-error availability_deprecated file.swift
swiftc -warnings-as-errors -no-warning-as-error availability_deprecated file.swift
swiftc -Werror availability_deprecated file.swift
swiftc -warnings-as-errors -Wwarning availability_deprecated file.swift
```
4 changes: 2 additions & 2 deletions userdocs/diagnostic_groups/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ The deprecated group is a supergroup designed to manage all kinds of warnings re
## Usage Example

```sh
swiftc -warning-as-error deprecated file.swift
swiftc -warnings-as-errors -no-warning-as-error deprecated file.swift
swiftc -Werror deprecated file.swift
swiftc -warnings-as-errors -Wwarning deprecated file.swift
```
4 changes: 2 additions & 2 deletions userdocs/diagnostic_groups/unknown_warning_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
The `unknown_warning_group` diagnostic group addresses warnings related to the specification of unrecognized warning groups in compilation flags.

```sh
swiftc -warning-as-error non_existing_group file.swift
swiftc -Werror non_existing_group file.swift
<unknown>:0: warning: unknown warning group: 'non_existing_group'
```

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:

```sh
swiftc -warning-as-error unknown_warning_group -warning-as-error non_existing_group file.swift
swiftc -Werror unknown_warning_group -Werror non_existing_group file.swift
<unknown>:0: error: unknown warning group: 'non_existing_group'
```