zeyi2 wrote:
> Have you reproduced this issue locally to be sure this one fixes it?
Yes, I reproduced this locally. Here is the setup I used:
I created a `compile_commands.json` in a temp directory, and passed a broken
PCH to `t.cpp` via:
```text
-include-pch /definitely/not-a-valid.pch
```
Then I used a Python script to run the same input twice: once without `--`, and
once with `--`.
Without `--`, clang-tidy failed as expected because the PCH could not be
loaded, and the file was left unchanged:
```text
without -- returncode: 1
error: PCH file '/definitely/not-a-valid.pch' not found
error: unable to read PCH file /definitely/not-a-valid.pch
Found compiler errors, but -fix-errors was not specified.
Fixes have NOT been applied.
without -- file unchanged: True
```
With `--`, the run succeeded and produced the expected CRLF output:
```text
with -- returncode: 0
with -- output matches expected CRLF: True
with -- output bytes: b'enum {\r\nRED = 1,\r\nGREEN = 2\r\n};\r\n'
```
https://github.com/llvm/llvm-project/pull/202271
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits