[clang] [clang] Improve diagnostic if intrin.h used in incompatible environments (PR #234114)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 27 05:54:23 PDT 2026


gallopruss-sie wrote:

Hi @rnk,

I've reworked this a bit (Claude Code assisted). This adds a test case for the intrin.h fallthrough. Now, this uses `__has_include_next()` to check if intrin.h exists and uses it if available. If you're building for Windows then it tries to include it regardless, so we would get a file not found error in misconfigured mingw, rather than what could be a confusing error message.

I think this means that this change (the new diagnostic), is limited to situations when we're not compiling for Windows, and don't have another intrin.h.

Please take another look.
Thanks

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


More information about the cfe-commits mailing list