I received a crash report in DiagnosticManager that was causes 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