See discussion here:
http://clang-developers.42468.n3.nabble.com/RFC-proper-string-handling-in-CXString-td4059287.html
Bugzilla URL:
https://bugs.llvm.org/show_bug.cgi?id=35896
Previous impl would read the byte past the end of a string (a llvm::StringRef), possibly exceeding the allocation for that memory and raising an MSAN issue.
This will instead save the character range specified by the StringRef and copy it on-demand to a new C string.
Passes existing tests, and now passes with MSAN as well.
This looks like a separate bug fix. Is it possible to separate the main_filename changes from this patch?