This looks like a bug rather than a feature of HeaderSearch, shouldn't the slash conversion go there?
(It seems unlikely that diagnostics should suggest one thing but we insert another)
I had just looked at the method name and thought it was the right place( suggestPathToFileForDiagnostics since it says "path to file".)
But looking at the comments,
/// Suggest a path by which the specified file could be found, for /// use in diagnostics to suggest a #include.
HeaderSearch API itself seems like a better place, I suppose the confusion comes from the fact that paths and the include-directives are
the same on unix-like systems.
Updating the patch
|710 ↗||(On Diff #196392)|
I don't think this is specific enough - on windows, backslashes are valid (or at least accepted by clang).