[clang] [Clang] Reland '__has_builtin should return false for aux triple builtins' (PR #126324)
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 08:49:43 PDT 2025
alexfh wrote:
Some code from NCCL (https://github.com/NVIDIA/nccl/blob/master/src/graph/xml.cc#L16) started failing to compile after this patch. A standalone test (https://gcc.godbolt.org/z/n1dbEGr1M):
```
#if defined(__x86_64__)
#include <cpuid.h>
#endif
```
This started producing the following error:
```
/opt/compiler-explorer/clang-trunk-20250807/lib/clang/22/include/cpuid.h:348:22: error: static declaration of '__cpuidex' follows non-static declaration
348 | static __inline void __cpuidex(int __cpu_info[4], int __leaf, int __subleaf) {
| ^
/opt/compiler-explorer/clang-trunk-20250807/lib/clang/22/include/cpuid.h:348:22: note: '__cpuidex' is a builtin with type 'void (int *, int, int) noexcept'
```
https://github.com/llvm/llvm-project/pull/126324
More information about the cfe-commits
mailing list