[llvm-dev] Tilde expression resolving wheh HOME is '/'

Simon Atanasyan via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 15 05:35:30 PST 2018


Hi Jonas, Zachary,

The expandTildeExpr routine and ExpandTilde unit test work
inconsistently if HOME is a root '/' folder. In that case the
expandTildeExpr resolves paths like `~/foo` into `//foo`. Double slash
looks strange, but Bash, for example, does the same thing `$ HOME=/
echo ~/foo`. But ExpandTilde unit test expects to get a normalized
`/foo` path in that case and fails.

I think we need to fix either expandTildeExpr routine or ExpandTilde
unit test. I can implement any solution, but cannot select the best
one. What do you think?

Regards,
Simon


More information about the llvm-dev mailing list