[clang] [clang][ARM][AArch64] Reapply "Define intrinsics guarded by __has_builtin on all platforms (#128222)" (PR #140910)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 12 08:51:15 PDT 2025


sarnex wrote:

Thanks for the explanation. 

To me it seems like the root issue here is that we have `__yield` (and probably a ton of other stuff) in `arm_acle.h` in Clang and it is not included from `intrin.h`, while MSVC's `intrin.h` does include `intrin0.inl.h` which has the declaration. 
The new warning seems to just expose this root issue, but obviously a new warning is being thrown so we have to do something, I'm not trying to punt responsibility :)

The first thing that comes to mind is to include `arm_acle.h` in `intrin.h` on ARM/AArch64. Obviously there are possible compile time concerns, but if MSVC allows all architecture-specific code to be abstracted away through `intrin.h`, it seems like we should too. Then we could change the warning to suggest `intrin.h` instead, which would be true on both MSVC and Clang.

Any feedback or suggestions on an approach to solve the issue?

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


More information about the cfe-commits mailing list