Skip to content

Commit d08dcee

Browse files
committed
doc + note
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent b1d1b20 commit d08dcee

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ It can be used like this:
6868
``__has_builtin`` should not be used to detect support for a builtin macro;
6969
use ``#ifdef`` instead.
7070

71+
When compiling with target offloading, ``__has_builtin`` only considers the
72+
currently active target.
73+
7174
``__has_constexpr_builtin``
7275
---------------------------
7376

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Non-comprehensive list of changes in this release
9898
This feature is enabled by default but can be disabled by compiling with
9999
``-fno-sanitize-annotate-debug-info-traps``.
100100

101+
- The ``__has_builtin`` function now only considers the currently active target when being used with target offloading.
102+
101103
New Compiler Flags
102104
------------------
103105
- New option ``-fno-sanitize-annotate-debug-info-traps`` added to disable emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).

0 commit comments

Comments
 (0)