Files
swift-mirror/userdocs/diagnostics/diagnostic-groups.md
Ben Barham b29a0a9b3d Fix up the userdocs index
A few docs weren't added to the index, re-run the generation and fix the
test to actually run in order to catch future issues.
2025-12-06 10:18:19 +10:00

2.8 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