DKLoehr wrote:

> I think it's reasonable to expect that a single pattern does not mix \ / as a 
> path separator in the same pattern.

This does seem reasonable. It is entirely _valid_ to do so according to the 
current format, since paths can in fact contain both \ / as separators. 
However, I'd expect that any file which is aware of the problem would be using 
the ugly `{\\,/}` syntax to work around the problem, so I doubt this will break 
much downstream.

> So, on windows we match the path as is, and then also match the converted 
> version.

It does have the downside that now we have to check every path twice on 
windows, though. I would expect the rule should instead be "if the pattern has 
backslashes, match \ / exactly; otherwise, treat / as matching both".

I'll look into updating the PR to do that unless there are any objections, 
though it's been a while so I'll have to remember everything I was doing.

https://github.com/llvm/llvm-project/pull/149886
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to