[all-commits] [llvm/llvm-project] 95bd9e: [clang][Sema] Declare builtins used in #pragma int...
Nick Sarnie via All-commits
all-commits at lists.llvm.org
Wed May 21 07:29:13 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 95bd9eef42679f3d13e3279204c75372e2c062f0
https://github.com/llvm/llvm-project/commit/95bd9eef42679f3d13e3279204c75372e2c062f0
Author: Nick Sarnie <nick.sarnie at intel.com>
Date: 2025-05-21 (Wed, 21 May 2025)
Changed paths:
M clang/lib/Parse/ParsePragma.cpp
A clang/test/Sema/Inputs/builtin-system-header.h
A clang/test/Sema/builtin-pragma-intrinsic.c
Log Message:
-----------
[clang][Sema] Declare builtins used in #pragma intrinsic (#138205)
When trying to remove the usage of `__has_builtin` on MSVC CUDA ARM for
some builtins, the recommended direction was to universally declare the
MSVC builtins on all platforms and require the header providing
declarations to be included. This was done
[here](https://github.com/llvm/llvm-project/pull/128222).
However, some MSVC headers already use the MSVC builtins without
including the header, so we introduce a warning for anyone compiling
with MSVC for this target, so the above change had to be reverted.
The MSVC headers use `#pragma intrinsic` before the intrinsic uses and
that seems to be enough for MSVC, so declare builtins when used in
`#pragma intrinsic` in Clang to prevent the warning.
---------
Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list