mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
`load_diagnostic_kind` matched `^\s+CARBON_DIAGNOSTIC_KIND` without `re.MULTILINE` against a file whose entries start at column zero, so it found nothing: `check_unused` was comparing an empty set of declarations against every use and reporting nothing at all. The check has never run. With it running, three kinds turn out to be registered and never declared, and go: `BuildFailureRunningClangToLink`, `BuildOutputFileOpenError`, and `BuildPreludeManifestError`. `load_diagnostic_uses_in` looked only for `CARBON_DIAGNOSTIC`, so a diagnostic declared with `CARBON_DIAGNOSTIC_ON_SCOPE` counted as unused, and it read the two macros' own definitions in `diagnostic.h` as uses. Both are why the kinds above could not simply be deleted before. Assisted-by: Claude Code --------- Co-authored-by: Geoff Romer <gromer@google.com>