A documentation URL is attached to a diagnostic and links to local or remote documentation. The
documentation can then be displayed alongside emitted diagnostics to teach users
about relevant language concepts or describe common problems and solutions.
This commit adds records for serializing documentation URLs in .dia files and
adds support for retrieving them from deserialized diagnostics via libclang.
It does not add any mechanisms for emitting documentation URLs alongside Clang
diagnostics. For now, only downstream projects (swift) support diagnostics
with documentation URLs.
This change is intended to support Swift's "educational notes" feature
(https://github.com/apple/swift/blob/master/docs/Diagnostics.md#educational-notes),
as well as future improvements to Clang's diagnostics. A brief discussion of
the goal behind this change can be found here:
http://lists.llvm.org/pipermail/cfe-dev/2020-May/065475.html
I am just wondering what happens with the ID. Shouldn't we pass it too?