AaronBallman wrote:

There is a bit of fallout from these changes that I don't think was discussed, 
but perhaps I'm just not spotting it. `\` is a path separator on Windows, and 
so I'm seeing failures in Intel's downstream on constructs like:
```
#line 1 "c:\moo\zar\haz.h"
```
because these are invalid escape sequences: https://godbolt.org/z/d8EnKvsqq

I think there's two issues. 1) we're now emitting effectively duplicate 
diagnostics because we give the warning and the error for the same issue, 2) 
are we sure we want this behavior for things that can reasonably file paths? I 
think we should continue to behave as we did in Clang 22.x and earlier where we 
warn about the unknown escape sequences but hard-rejecting seems user-hostile 
given how often this pattern appears in the wild: 
https://sourcegraph.com/search?q=context:global+lang:C%2B%2B+%5E%23line+%5B0-9%5D%2B+%5C%22%5BA-Za-z0-9_%5D*+%5C%5C+%5BA-Za-z0-9_%5D*%5C%22%24&patternType=regexp&case=yes&sm=0

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

Reply via email to