Unverified Commit f0691bcd authored by Jan Svoboda's avatar Jan Svoboda Committed by GitHub
Browse files

[clang][lex] Fix non-portability diagnostics with absolute path (#74782)

The existing code incorrectly assumes that `Path` can be empty. It
can't, it always contains at least `<` or `"`. On Unix, this patch fixes
an incorrect diagnostics that instead of `"/Users/blah"` suggested
`"Userss/blah"`. In assert builds, this would outright crash.

This patch also fixes a bug on Windows that would prevent the diagnostic
being triggered due to separator mismatch.

rdar://91172342
parent 2a8f40d4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment