[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

Max Winkler via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 13 22:15:58 PDT 2024


MaxEW707 wrote:

> Not sure how you're actually hitting the error you reported; the clang header directory should count as a system header, so the warning should normally be suppressed, I think.

It is counted as a system header and I could not repro the warning in my local tests. I was going off the user who posted the issue in the previous PR.

clang_cc1 substitution in lit also adds the header path via `-internal-isystem` which is why our unit tests weren't hitting this.

> Please add a testcase (something similar to clang/test/Headers/ms-intrin.cpp, but including intrin0.h instead of intrin.h, to catch obvious mistakes in the header).

`intrin.h` includes `intrin0.h`. Our unit tests weren't hitting this since lit adds the clang header path as a system include so warnings are suppressed. I should be able to use "--no-system-header-prefix" to workaround that. I'll give that a try inside `ms-intrin.cpp` and that will cover both `intrin.h` and `intrin0.h`.

https://github.com/llvm/llvm-project/pull/112066


More information about the cfe-commits mailing list