mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 13:02:41 +00:00
Previously we would drop these diagnostics; now periodically flush them to Carbon's diagnostics emitter. We flush them at the end of checking, and also immediately before changing the set of diagnostic annotation scopes, so that Clang diagnostics get properly annotated. This exposes some double diagnostics being produced in situations where Clang's name lookup logic would produce a diagnostic and we also produced one. For access control issues, use the Carbon diagnostic, in order to properly handle protected access. For ambiguity issues, use the Clang diagnostic that produces helpful notes. Also fix rendering of note diagnostics produced by Clang, by attaching them to the prior error / warning diagnostic. --------- Co-authored-by: Boaz Brickner <brickner@google.com> Co-authored-by: Jon Ross-Perkins <jperkins@google.com>