[clang] [clang-tools-extra] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 11 06:44:39 PDT 2025
AaronBallman wrote:
> > Windows doesn't have `/tmp` for example. I don't think we have any [substitutions](https://llvm.org/docs/CommandGuide/lit.html#substitutions) for getting the temp directory.
>
> Ah, I meant non-windows systems (I thought `REQUIRES: shell` already meant non-windows because the test uses quite a few unix commands but I might be wrong). But also, doesn’t windows have like `%TEMP%` or something? If that works we could probably ‘just’ add a substitution for that (I’m not an expert on anything cross-platform though so this might still be an issue for some platforms).
Good call about `%TEMP`! But I think if we're going to go down this path, it might make sense to add a new substitution to lit (maybe `%tempdir`) so the logic is hidden outside of the test and can be reused if anyone else runs into this.
I suppose another option is to use a regex in the test to accept either form of canonicalization with a comment that lit tests are sometimes run from network mounts and that's why the test is the way it is.
https://github.com/llvm/llvm-project/pull/143520
More information about the cfe-commits
mailing list