[libclang] Fix conversion from `StringRef` to `CXString`
`CXString createRef(StringRef String)` used to return an invalid string when invoked with some empty strings: If a `StringRef` holds a non-nullptr pointer, for instance, pointing into contents of a larger string, and has a zero length, `createRef` previously returned the entire larger string, ignoring the fact that the actual string passed to it as a param is empty. This was discovered when invoking `c-index-test` to dump the contents of documentation comments, in case the comment contains an empty HTML attribute, such as `src=""`. Differential Revision: https://reviews.llvm.org/D133009
Loading
Please sign in to comment