Files
swift-mirror/userdocs/diagnostics/diagnostic-groups.md
Ben Barham 55f61a84ca Re-generate diagnostics index and cleanup old notes
This is mostly just cleanup:
1. Removes `diagnostic-descriptions.md` since it isn't used any more
2. Adds the group name to all the old notes files
3. Removes trailing whitespace
4. Adds "See Also" sections for notes that have links
2025-10-20 19:19:36 -07:00

2.6 KiB

Diagnostic groups

Detailed explanations for various compiler diagnostics.

Overview

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 (when that group contains warnings):

  • -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:

-Werror DeprecatedDeclaration

Or upgrade all warnings except deprecated declaration to errors:

-warnings-as-errors -Wwarning DeprecatedDeclaration

Groups with warnings

Topics