commit | 11eb806a2ff1309cffa9e61d3dda55318608b99e | [log] [tgz] |
---|---|---|
author | Adrian Prantl <aprantl@apple.com> | Fri Apr 21 08:20:39 2023 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Apr 21 08:25:52 2023 -0700 |
tree | efd54493abeefe814bade08dd5b169b55f57a5aa | |
parent | 5dbc000737fb9c8fd43cebca3f59b51cd139498b [diff] |
Make diagnostics API safer to use I received a crash report in DiagnosticManager that was caused by a nullptr diagnostic having been added. The API allows passing in a null unique_ptr, but all the methods are written assuming that all pointers a dereferencable. This patch makes it impossible to add a null diagnostic. rdar://107633615 Differential Revision: https://reviews.llvm.org/D148823 GitOrigin-RevId: 737820e6d6e2df50f2ddf522a0db9ffb794ff749