463 Commits

Author SHA1 Message Date
c8ef
6e614e11df
[clang][docs] Revise documentation for __builtin_reduce_(max|min). (#114637)
The function operation described in the document did not match its
actual semantic meaning, this patch resolved the problem.
2024-11-14 09:28:51 +08:00
Aaron Ballman
4661467003
[C2y] Add test coverage and documentation for WG14 N3341 (#115478)
This paper made empty structures and unions implementation-defined. We
have always supported this as a GNU extension, so now we're documenting
our behavior and removing the extension warning in C2y mode.
2024-11-08 13:07:05 -05:00
Aaron Ballman
4027400d2c
[C2y] Add test coverage and documentation for WG14 N3342 (#115494)
This paper made qualified function types implementation-defined. We have
always supported this as an extension, so now we're documenting our
behavior.

Note, we still warn about this by default even in C2y mode because a
qualified function type is a sign of programmer confusion.
2024-11-08 11:25:39 -05:00
Bill Wendling
7475156d49
[Clang] Add __builtin_counted_by_ref builtin (#114495)
The __builtin_counted_by_ref builtin is used on a flexible array
pointer and returns a pointer to the "counted_by" attribute's COUNT
argument, which is a field in the same non-anonymous struct as the
flexible array member. This is useful for automatically setting the
count field without needing the programmer's intervention. Otherwise
it's possible to get this anti-pattern:
    
      ptr = alloc(<ty>, ..., COUNT);
      ptr->FAM[9] = 42; /* <<< Sanitizer will complain */
      ptr->count = COUNT;
    
To prevent this anti-pattern, the user can create an allocator that
automatically performs the assignment:
    
      #define alloc(TY, FAM, COUNT) ({ \
          TY __p = alloc(get_size(TY, COUNT));             \
          if (__builtin_counted_by_ref(__p->FAM))          \
              *__builtin_counted_by_ref(__p->FAM) = COUNT; \
          __p;                                             \
      })

The builtin's behavior is heavily dependent upon the "counted_by"
attribute existing. It's main utility is during allocation to avoid
the above anti-pattern. If the flexible array member doesn't have that
attribute, the builtin becomes a no-op. Therefore, if the flexible
array member has a "count" field not referenced by "counted_by", it
must be set explicitly after the allocation as this builtin will
return a "nullptr" and the assignment will most likely be elided.

---------

Co-authored-by: Bill Wendling <isanbard@gmail.com>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
2024-11-07 22:03:55 +00:00
Qiu Chaofan
7ceb19e599
[PowerPC] Support set_flt_rounds builtin (#73750) 2024-11-04 16:45:05 +08:00
yabinc
627746581b
Reapply "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898) (#110051)
This reverts commit d50eaac12f0cdfe27e942290942b06889ab12a8c. Also fixes
a bug calculating offsets for bit fields in the original patch.
2024-10-14 16:32:24 -07:00
Simon Pilgrim
c7fb0eed05
[clang][x86] Add constexpr support for ADC/SBB + ADX intrinsics (#110668)
ADC and ADX use the same internal intrinsics - for testing I've taken the same approach as the generic builtin overflow tests, putting the intrinsics in a constexpr test wrapper and comparing the carry/result value pair.

I've added the addcarry/subborrow intrinsics to the clang language extension list - I'm not sure if we want to add all ISA intrinsics to the list (although we can if people think it useful?), but I felt we should at least include the baseline x86 intrinsics.
2024-10-02 15:45:02 +01:00
Francis Visoiu Mistrih
9440420f63
[Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (#110198)
We have the LLVM intrinsics, and we're missing the clang builtins to be
used directly in code that needs to make the distinction in NaN
semantics.
2024-10-01 15:39:23 -07:00
Tex Riddell
b70d32789c
[HLSL][clang] Add elementwise builtin for atan2 (p3) (#110187)
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294

- Add HLSL frontend for atan2
- Add clang Builtin, map to new llvm.atan2
- SemaChecking restrict to floating point and 2 args
- SemaHLSL restrict to float or half.
- Add to clang ReleaseNotes.rst and LanguageExtensions.rst
- Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency
- Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl

Part 3 for Implement the atan2 HLSL Function #70096.
2024-10-01 14:41:43 -07:00
Zhengxing li
5d08f3256b
[HLSL] Implementation of the elementwise fmod builtin (#108849)
This change add the elementwise fmod builtin to support HLSL function
'fmod' in clang for #99118

Builtins.td           - add the fmod builtin
CGBuiltin.cpp         - lower the builtin to llvm FRem instruction
hlsl_intrinsics.h     - add the fmod api
SemaChecking.cpp      - add type checks for builtin
SemaHLSL.cpp          - add HLSL type checks for builtin

clang/docs/LanguageExtensions.rst - add the builtin in *Elementwise
Builtins*
clang/docs/ReleaseNotes.rst        - announce the builtin
2024-09-27 17:26:06 -04:00
Eli Friedman
d50eaac12f
Revert "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898)
Reverts llvm/llvm-project#97121

Causing failures on LNT bots; log shows a crash in
ConstStructBuilder::BuildStruct.
2024-09-24 20:31:54 -07:00
yabinc
7a086e1b2d
[clang][CodeGen] Zero init unspecified fields in initializers in C (#97121)
When an initializer is provided to a variable, the Linux kernel relied
on the compiler to zero-initialize unspecified fields, as clarified in
https://www.spinics.net/lists/netdev/msg1007244.html.

But clang doesn't guarantee this:
1. For a union type, if an empty initializer is given, clang only
   initializes bytes for the first field, left bytes for other (larger)
   fields are marked as undef. Accessing those undef bytes can lead
   to undefined behaviors.
2. For a union type, if an initializer explicitly sets a field, left
   bytes for other (larger) fields are marked as undef.
3. When an initializer is given, clang doesn't zero initialize padding.

So this patch makes the following change:
1. In C, when an initializer is provided for a variable, zero-initialize
   undef and padding fields in the initializer.
2. Document the change in LanguageExtensions.rst.

As suggested in
https://github.com/llvm/llvm-project/issues/78034#issuecomment-2183437928,
the change isn't required by C23, but it's standards conforming to do
so.

Fixes: https://github.com/llvm/llvm-project/issues/97459
2024-09-24 19:06:20 -07:00
Nikolas Klauser
f5be5cdaad
[Clang] Add __builtin_common_type (#99473)
This implements the logic of the `common_type` base template as a
builtin alias. If there should be no `type` member, an empty class is
returned. Otherwise a specialization of a `type_identity`-like class is
returned. The base template (i.e. `std::common_type`) as well as the
empty class and `type_identity`-like struct are given as arguments to
the builtin.
2024-09-22 09:25:52 +02:00
Sarah Spall
67518a44fe
[HLSL] Implement elementwise popcount (#108121)
Add new elementwise popcount builtin to support HLSL function
'countbits'.
elementwise popcount only accepts integer types.
Add hlsl intrinsic 'countbits'
Closes #99094
2024-09-18 08:19:52 -07:00
Mital Ashok
be427dfb9e
[Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (#102044)
Added a new `-Wpre-c++26-compat` warning for when this feature is used
in C++26 and a `-Wc++26-extensions` warning for when this is used in
C++11 through C++23.

---------

Co-authored-by: cor3ntin <corentinjabot@gmail.com>
2024-09-05 17:38:08 +02:00
ZERICO2005
d03dcf6e8c
[NFC] Fixed two typos: "__builin_" --> "__builtin_" (#98782)
Fixed two typos:
1. `__builin_va_list` --> `__builtin_va_list`
2. `__builin_suspend` --> `__builtin_suspend`
2024-08-20 21:49:40 +02:00
Fangrui Song
b5f3e28eca
[docs] Revise the doc for __builtin_allow_runtime_check
Fix list formatting, improve the wording, and fix the description when
both options (note: prefer "option" to "flag" when arguments are
supported) are specified.

Pull Request: https://github.com/llvm/llvm-project/pull/104886
2024-08-19 18:05:06 -07:00
Sirraide
2b0a8fcf70
[Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (#101448)
Implement P2893R3 ‘Variadic friends’ for C++26.

This closes #98587.

Co-authored-by: Younan Zhang <zyn7109@gmail.com>
2024-08-15 21:16:30 +02:00
Vlad Serebrennikov
d213981c80
[clang] Implement __builtin_is_implicit_lifetime() (#101807)
This intrinsic supports [P2647R1](https://wg21.link/p2674r1) "A trait
for implicit lifetime types".
Resolves #98627

---------

Co-authored-by: Timm Baeder <tbaeder@redhat.com>
2024-08-14 20:15:56 +04:00
Sirraide
c65afad9c5
[Clang] Define __cpp_pack_indexing (#101956)
Following the discussion on #101448 this defines 
`__cpp_pack_indexing`. Since pack indexing is currently
supported in all language modes, the feature test macro 
is also defined in all language modes.
2024-08-05 14:02:15 +02:00
Nikolas Klauser
eccc6487c1
[Clang] Remove __is_nullptr (#99038)
`is_null_pointer` can be implemented very efficiently as
`__is_same(__remove_cv(T), decltype(nullptr))`. Since GCC supports both
of these builtins as well, libc++ has no interest in using
`__is_nullptr` instead. Furthermore, I could find only a single use in
the wild
(https://sourcegraph.com/search?q=context:global+__is_nullptr%28+-file:clang&patternType=keyword&sm=0).
Because of these reasons I don't think it's worth keeping this builtin
around.
2024-08-04 10:34:04 +02:00
Vlad Serebrennikov
988fd956e7
[clang] Implement __builtin_is_virtual_base_of() intrinsic (#100393)
This patch adds compiler support for
[P2985R0](https://wg21.link/p2985r0) "A type trait for detecting virtual
base classes".
Like we recently did with `__is_layout_compatible()` and
`__is_pointer_interconvertible_base_of()`, we support it only in C++
mode, and reject VLAs.

Resolves #98310.
2024-07-26 09:09:54 +02:00
Aaron Ballman
2c2148de85
[C2y] Add documentation to conform to WG14 N3262; NFC (#98146)
This paper is about whether a copy of a va_list object which was not
produced by calling va_copy is valid to use or not. While this may work
on some targets, we explicitly document it as undefined behavior for all
targets so there's not confusion as to when it's valid or not. It's not
a burden for a user to use va_copy explicitly.
2024-07-12 07:07:27 -04:00
Richard Smith
569faa4dc0
Add documentation for __builtin_object_size. (#96573)
Explicitly describe how the Clang builtin works, given that it's not
exactly the same as GCC's builtin of the same name -- but is drop-in
compatible.

Fixes #95635.
2024-06-25 23:51:12 -07:00
Akira Hatanaka
2604830aac
Add support for __builtin_verbose_trap (#79230)
The builtin causes the program to stop its execution abnormally and
shows a human-readable description of the reason for the termination
when a debugger is attached or in a symbolicated crash log.

The motivation for the builtin is explained in the following RFC:

https://discourse.llvm.org/t/rfc-adding-builtin-verbose-trap-string-literal/75845

clang's CodeGen lowers the builtin to `llvm.trap` and emits debugging
information that represents an artificial inline frame whose name
encodes the category and reason strings passed to the builtin.
2024-06-25 08:33:05 -07:00
Jon Roelofs
b3c668b005
[clang][docs] '#pragma clang section' is supported on Mach-O. NFC
This was added back in 7f6e3316456f939a062aad0eeaac983251a1747c, but I forgot
to update the docs that referenced it.
2024-06-24 15:35:53 -07:00
Farzon Lotfi
f73ac218a6
[HLSL][clang] Add elementwise builtins for trig intrinsics (#95999)
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294

This is part 3 of 4 PRs. It sets the ground work for using the
intrinsics in HLSL.

Add HLSL frontend apis for `acos`, `asin`, `atan`, `cosh`, `sinh`, and
`tanh`
https://github.com/llvm/llvm-project/issues/70079
https://github.com/llvm/llvm-project/issues/70080
https://github.com/llvm/llvm-project/issues/70081
https://github.com/llvm/llvm-project/issues/70083
https://github.com/llvm/llvm-project/issues/70084
https://github.com/llvm/llvm-project/issues/95966
2024-06-22 17:17:34 -07:00
Mariya Podchishchaeva
41c6e43792
Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (#95802)
This commit implements the entirety of the now-accepted [N3017
-Preprocessor
Embed](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm) and
its sister C++ paper [p1967](https://wg21.link/p1967). It implements
everything in the specification, and includes an implementation that
drastically improves the time it takes to embed data in specific
scenarios (the initialization of character type arrays). The mechanisms
used to do this are used under the "as-if" rule, and in general when the
system cannot detect it is initializing an array object in a variable
declaration, will generate EmbedExpr AST node which will be expanded by
AST consumers (CodeGen or constant expression evaluators) or expand
embed directive as a comma expression.

This reverts commit
682d461d5a.

---------

Co-authored-by: The Phantom Derpstorm <phdofthehouse@gmail.com>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
Co-authored-by: cor3ntin <corentinjabot@gmail.com>
Co-authored-by: H. Vetinari <h.vetinari@gmx.com>
2024-06-20 14:38:46 +02:00
Gábor Horváth
edabb5c12e
[clang] Clean up macOS version flags (#95374)
The -mmacos-version-min flag is preferred over -mmacosx-version-min.
This patch updates the tests and documentation to make this clear and
also adds the missing logic to scan build to handle the new flag.

Fixes #86376.

Co-authored-by: Gabor Horvath <gaborh@apple.com>
2024-06-16 12:25:25 +02:00
Vitaly Buka
682d461d5a
Revert " [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy)" (#95299)
Reverts llvm/llvm-project#68620

Introduce or expose a memory leak and UB, see llvm/llvm-project#68620
2024-06-12 13:14:26 -07:00
The Phantom Derpstorm
5989450e00
[clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (#68620)
This commit implements the entirety of the now-accepted [N3017 -
Preprocessor
Embed](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm) and
its sister C++ paper [p1967](https://wg21.link/p1967). It implements
everything in the specification, and includes an implementation that
drastically improves the time it takes to embed data in specific
scenarios (the initialization of character type arrays). The mechanisms
used to do this are used under the "as-if" rule, and in general when the
system cannot detect it is initializing an array object in a variable
declaration, will generate EmbedExpr AST node which will be expanded
by AST consumers (CodeGen or constant expression evaluators) or
expand embed directive as a comma expression.

---------

Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
Co-authored-by: cor3ntin <corentinjabot@gmail.com>
Co-authored-by: H. Vetinari <h.vetinari@gmx.com>
Co-authored-by: Podchishchaeva, Mariya <mariya.podchishchaeva@intel.com>
2024-06-12 09:16:02 +02:00
Haojian Wu
f6c1e65ddf
[clang] Implement a __is_bitwise_cloneable builtin type trait. (#86512)
This patch implements a `__is_bitwise_cloneable` builtin in clang.

The builtin is used as a guard to check a type can be safely bitwise
copied by memcpy. It's functionally similar to
`__is_trivially_copyable`, but covers a wider range of types (e.g.
classes with virtual functions). The compiler guarantees that after
copy, the destination object has the same object representations as the
source object. And it is up to user to guarantee that program semantic
constraints are satisfied.

Context:
https://discourse.llvm.org/t/extension-for-creating-objects-via-memcpy
2024-06-06 07:28:02 +02:00
Pierre van Houtryve
c1ac6d2dd4
[AMDGPU] Add amdgpu-as MMRA for fences (#78572)
Using MMRAs, allow `builtin_amdgcn_fence` to emit fences that only
target one or more address spaces, instead of fencing all address spaces
at once.

This is done through a `amdgpu-as` MMRA. Currently focused on OpenCL
fences, but can very easily support more AS names and codegen on more
than just fences.
2024-05-27 12:17:04 +02:00
cor3ntin
2dbe89d150
[Clang] Implement __reference_converts_from_temporary (#91199)
This completes the required language support for P2255R2.
2024-05-10 08:50:44 +02:00
Farzon Lotfi
31b45a9d0d
[clang][hlsl] Add tan intrinsic part 1 (#90276)
This change is an implementation of #87367's investigation on supporting
IEEE math operations as intrinsics.
Which was discussed in this RFC:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294

If you want an overarching view of how this will all connect see:
https://github.com/llvm/llvm-project/pull/90088

Changes:
- `clang/docs/LanguageExtensions.rst` - Document the new elementwise tan
builtin.
-  `clang/include/clang/Basic/Builtins.td` - Implement the tan builtin.
- `clang/lib/CodeGen/CGBuiltin.cpp` - invoke the tan intrinsic on uses
of the builtin
- `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Associate the tan builtin
with the equivalent hlsl apis
- `clang/lib/Sema/SemaChecking.cpp` - Add generic sema checks as well as
HLSL specifc sema checks to the tan builtin
-  `llvm/include/llvm/IR/Intrinsics.td` - Create the tan intrinsic
-  `llvm/docs/LangRef.rst` - Document the tan intrinsic
2024-05-07 22:54:15 -04:00
Pol Marcet Sardà
2903df02fb Squashed commit of the following:
commit 8d41d93e3fceb3f3af77266f5a8388fc585150a5
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Sat Apr 20 12:19:49 2024 +0200

    Address some misc comments; added a diagnostic and expanded macros in
    testing.

commit 9493c0f290b558947d8b3ae8e1adf909b0fb9dcd
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Sun Mar 31 18:18:45 2024 +0200

    Following the review of sethp, I have made the following changes:

    -- Added diagnostic for the undefined shuffle of -1
    -- Validated support for _BitInt
    -- A bunch of other minnor tweaks here and there

commit 8273abc8d56ef8225cf4dba84f66a1e54a2ef036
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Thu Jan 4 12:31:08 2024 +0100

    Fix typo in file name

commit ff68f23921966c7d9605f91a47d6b481bf1d7a7b
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Thu Jan 4 11:26:08 2024 +0100

    Address suggestions from RKSimon

commit c14783de45687c754253c0cbf8a7834c7f986d80
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Sat Dec 30 13:59:00 2023 +0100

    [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector

    Summary:

    This patch adds constexpr support for __builtin_shufflevector
    and __builtin_convertvector.

    A small oddity encountered was that the arg to the intrinsics may be an
    lvalue without any sort of implicit cast of any kind. I solved this
    through the EvaluateVectorOrLValue function, which treats the lvalue as
    if it was in an rvalue cast, which gets me the desired vector.

Co-Authored-By: Seth Pellegrino <seth@codecopse.net>
2024-04-29 09:09:59 -07:00
Lawrence Benson
bd07c22e53
[Clang] Add support for scalable vectors in __builtin_reduce_* functions (#87750)
Currently, a lot of `__builtin_reduce_*` function do not support
scalable vectors, i.e., ARM SVE and RISCV V. This PR adds support for
them. The main code change is to use a different path to extract the
type from the vectors, the rest is the same and LLVM supports the reduce
functions for `vscale` vectors.

This PR adds scalable vector support for:
- `__builtin_reduce_add`
- `__builtin_reduce_mul`
- `__builtin_reduce_xor`
- `__builtin_reduce_or`
- `__builtin_reduce_and`
- `__builtin_reduce_min`
- `__builtin_reduce_max`

Note: For all except `min/max`, the element type must still be an
integer value. Adding floating point support for `add` and `mul` is
still an open TODO.
2024-04-29 16:45:33 +02:00
cor3ntin
6dd90616c4
[Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (#89906)
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0609r3.pdf

We support this feature in all language mode.

maybe_unused applied to a binding makes the whole declaration unused.
2024-04-28 20:25:44 +02:00
Aaron Ballman
72c373bfdc
[C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (#89446)
These macros are used by STL implementations to support implementation
of std::hardware_destructive_interference_size and
std::hardware_constructive_interference_size

Fixes #60174

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2024-04-26 12:05:15 -04:00
Nikolas Klauser
9aa663bb9e
[Clang] Fix __is_trivially_equaltiy_comparable documentation (#88528)
Currently `__is_trivially_equality_comparable` is documented to return
true if comparing the value representation is equivalent to calling the
comparison operator, which is not quite what the trait actually checks.
The traits actually checks that comparing the object representation is
equivalent, which means that there cannot be padding bytes in the type.
2024-04-22 19:26:33 +02:00
Vitaly Buka
1f35e72271
[clang][builtin] Implement __builtin_allow_runtime_check (#87568)
RFC:
https://discourse.llvm.org/t/rfc-introduce-new-clang-builtin-builtin-allow-runtime-check/78281

---------

Co-authored-by: Noah Goldstein <goldstein.w.n@gmail.com>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
2024-04-16 17:50:16 -07:00
Sirraide
ef164cee90
[Clang] [C++26] Implement P2573R2: = delete("should have a reason"); (#86526)
This implements support for the `= delete("message")` syntax that was
only just added to C++26
([P2573R2](https://isocpp.org/files/papers/P2573R2.html#proposal-scope)).
2024-04-14 12:30:01 +02:00
Vlad Serebrennikov
0412a8651a [clang] Add missing documentation entry for __is_pointer_interconvertible_base_of() 2024-04-13 13:10:42 +03:00
OverMighty
ac1af75051
[clang] Implement constexpr support for __builtin_{clzg,ctzg} (#86577)
Fixes #86549.
2024-03-26 13:22:47 -07:00
OverMighty
c1c2551a28
[clang] Implement __builtin_{clzg,ctzg} (#83431)
Fixes #83075, fixes #83076.
2024-03-21 09:33:16 -07:00
Nikolas Klauser
2699072b4b
[clang] Accept lambdas in C++03 as an extensions (#73376)
Implements
https://discourse.llvm.org/t/rfc-allow-c-11-lambdas-in-c-03-as-an-extension/75262
2024-03-21 12:57:24 +01:00
Ahmed Bougacha
0481f049c3
[AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (#65996)
This defines the basic set of pointer authentication clang builtins
(provided in a new header, ptrauth.h), with diagnostics and IRGen
support.  The availability of the builtins is gated on a new flag,
`-fptrauth-intrinsics`.

Note that this only includes the basic intrinsics, and notably excludes
`ptrauth_sign_constant`, `ptrauth_type_discriminator`, and
`ptrauth_string_discriminator`, which need extra logic to be fully
supported.

This also introduces clang/docs/PointerAuthentication.rst, which
describes the ptrauth model in general, in addition to these builtins.

Co-Authored-By: Akira Hatanaka <ahatanaka@apple.com>
Co-Authored-By: John McCall <rjmccall@apple.com>
2024-03-15 14:17:21 -07:00
Tom Honermann
92b56011e6
[clang] Fix documentation markup in the Clang release notes and language extension docs. (#85310) 2024-03-15 11:30:43 -04:00
Tim Northover
4299c727e4 AArch64: add __builtin_arm_trap
It's useful to provide an indicator code with the trap, which the generic
__builtin_trap can't do. asm("brk #N") is an option, but following that with a
__builtin_unreachable() leads to two traps when the compiler doesn't know the
block can't return. So compiler support like this is useful.
2024-03-14 11:32:44 +00:00
OverMighty
487cfbe494
[Clang] Implement constexpr support for __builtin_popcountg (#84318) 2024-03-08 01:01:37 +01:00