The *Info object (for the copy of the AST") constructors had many duplicated variants. Many of the variants seemed to be in an attempt to avoid default arguments. But default arguments are not prohibited and using them allows most of the variants to be removed which improves readability.
Remove the IsInGlobalNamespace flag on a Reference. This is set when the path is empty, and only read once in the HTML generator with the identical condition. The constructor cleanup exposed a problem where this was set to false when the constructor with no path was used, but true when the path was set to empty.
There should be no observable change with the exception that IsInGlobalNamespace is no longer emitted in YAML.
This block ID came from L582, which read from a bitcode file when BI_REFERENCE_BLOCK_ID is encountered. I am not familiar with the content of an arbitrary bitcode file. But after your patch, if this block ID is encountered, it will result in an error (a behavior change).
It looks like REFERENCE_IS_IN_GLOBAL_NAMESPACE is only defined in in clang-doc and not part of LLVM's bitcode header. So it looks like it is not a standardized ID to me. Could you confirm it?
If REFERENCE_IS_IN_GLOBAL_NAMESPACE only presents in bitcode file generated from BitcodeWriter from clang-doc and we are not expecting to provide compatibility to an arbitrary bitcode generated from elsewhere, I am OK with deleting this field (I still don't think this is the right approach to do but I don't have a strong opinion on this either).