diff --git a/include/swift/AST/DiagnosticEngine.h b/include/swift/AST/DiagnosticEngine.h index 3d2a572c7152b..b9720c3932e81 100644 --- a/include/swift/AST/DiagnosticEngine.h +++ b/include/swift/AST/DiagnosticEngine.h @@ -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 @@ -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 diff --git a/userdocs/diagnostic_groups/availability_deprecated.md b/userdocs/diagnostic_groups/availability_deprecated.md index 5169ad30567ee..92b6e19dcbbeb 100644 --- a/userdocs/diagnostic_groups/availability_deprecated.md +++ b/userdocs/diagnostic_groups/availability_deprecated.md @@ -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 ``` \ No newline at end of file diff --git a/userdocs/diagnostic_groups/deprecated.md b/userdocs/diagnostic_groups/deprecated.md index db9e404ccea35..1ee5cc07bd02f 100644 --- a/userdocs/diagnostic_groups/deprecated.md +++ b/userdocs/diagnostic_groups/deprecated.md @@ -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 ``` \ No newline at end of file diff --git a/userdocs/diagnostic_groups/unknown_warning_group.md b/userdocs/diagnostic_groups/unknown_warning_group.md index ed42b6f368404..de0657b8956dd 100644 --- a/userdocs/diagnostic_groups/unknown_warning_group.md +++ b/userdocs/diagnostic_groups/unknown_warning_group.md @@ -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 :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 :0: error: unknown warning group: 'non_existing_group' ```