This normalizes most paths (except ones input from the user as command
line arguments) into the preferred form, if real_style() evaluates to
Windows_forward.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Make sure to force paths to backslashes in widenPath if they are passed with the absolute long path prefix \\?\ but with forward slashes, i.e. as //?/.
llvm/lib/Support/Windows/Path.inc | ||
---|---|---|
79–80 | I'm assuming we purposefully don't care about complete nonsense like \/?\ not getting normalized into \\?\? We should add tests for both //?/ and the nonsense form. |
llvm/lib/Support/Windows/Path.inc | ||
---|---|---|
79–80 | Thanks for the suggested edit, yeah that's nicer. I added a test for //?/ in llvm/unittests/Support/Path.cpp, lines 2296-2305, but I guess we could add a test for the nonsense form to clarify that case too. |
llvm/lib/Support/Windows/Path.inc | ||
---|---|---|
79–80 | I don't insist on the nonsense form, but I figured it would help to demonstrate that we explicitly considered the case and don't care to support it. |
Did the suggested code simplification, added a testcase for the degenerate case we don't handle.
I'm assuming we purposefully don't care about complete nonsense like \/?\ not getting normalized into \\?\?
We should add tests for both //?/ and the nonsense form.