[clang/Diagnostic] Use `optional` to disambiguate between a `StoredDiagMessage` that...
authorArgyrios Kyrtzidis <kyrtzidis@apple.com>
Fri, 3 Mar 2023 18:35:23 +0000 (10:35 -0800)
committerArgyrios Kyrtzidis <kyrtzidis@apple.com>
Fri, 3 Mar 2023 20:48:48 +0000 (12:48 -0800)
commit5e035651fd3acbb2645abbe80cae332d90eac78a
tree5e48fab512ad8d6ecc1b4649bdf346a80308c50d
parentb30b1f173c911d9b04bbe70ad9b1e3c6c3cd6246
[clang/Diagnostic] Use `optional` to disambiguate between a `StoredDiagMessage` that is not set vs set as empty string

"But when would you have a completely empty diagnostic message", you ask dear reader?
That is when there is an empty "#warning" in code.

rdar://106155415

Differential Revision: https://reviews.llvm.org/D145256
clang/include/clang/Basic/Diagnostic.h
clang/lib/Basic/Diagnostic.cpp
clang/unittests/Basic/DiagnosticTest.cpp