Skip to content

organizes new articles into the existing pages for descriptions and groups #82350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion userdocs/diagnostics/diagnostic-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Detailed explanations for various compiler diagnostics.
## Overview

Swift diagnostics are classified into errors and warnings. Warnings can only be silenced in an
intentional manner, e.g., adding `_ =` for an unused function result.
intentional manner, for example adding `_ =` for an unused function result.

Some diagnostics have more detailed explanations available. These include a `[#Name]` inline and
reference to this documentation at the end of the compiler output on the command line, or is
Expand Down
8 changes: 6 additions & 2 deletions userdocs/diagnostics/diagnostic-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@ Diagnostic groups allow controlling the behavior of warnings in a more precise m
Diagnostic groups collect some number of diagnostics together under a common group name. This allows
for extra documentation to help explain relevant language concepts, as well as the ability to
control the behavior of warnings in a more precise manner:

- `-Werror <group>` - upgrades warnings in the specified group to errors
- `-Wwarning <group>` - indicates that warnings in the specified group should remain warnings, even
if they were previously upgraded to errors

As a concrete example, to upgrade deprecated declaration warnings to errors:

```sh
-Werror DeprecatedDeclaration
```

Or upgrade all warnings except deprecated declaration to errors:

```sh
-warnings-as-errors -Wwarning DeprecatedDeclaration
```


## Topics

- <doc:clang-declaration-import>
- <doc:deprecated-declaration>
- <doc:implementation-only-deprecated>
- <doc:missing-module-on-known-paths>
- <doc:preconcurrency-import>
- <doc:strict-language-features>
- <doc:strict-memory-safety>
- <doc:unknown-warning-group>

- <doc:availability-unrecognized-name>
1 change: 1 addition & 0 deletions userdocs/diagnostics/missing-module-on-known-paths.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Missing Module On Known Path From A Dependency Note (`MissingModuleOnKnownPaths`)

Warnings that provide information about missing module dependencies.

This diagnostic group covers notes related to displaying information about a missing module dependency which the compiler is able to locate as present on a search path found in a loaded Swift binary module, but which is not specified to the current compilation.

Expand Down