[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 06:47:43 PST 2025


Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/98756 at github.com>


================
@@ -1847,133 +1847,133 @@ def C11AtomicIsLockFree : Builtin {
 // GNU atomic builtins.
 def AtomicLoad : AtomicBuiltin {
   let Spellings = ["__atomic_load"];
-  let Attributes = [CustomTypeChecking];
+  let Attributes = [CustomTypeChecking, Constexpr];
----------------
AaronBallman wrote:

When removing the constexpr-ness from these functions in C, please also make sure `__c11_atomic_is_lock_free` is tested as well; that was already marked `constexpr` and that might be a bug.

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


More information about the cfe-commits mailing list