[llvm] [clang] [clang-tools-extra] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 21:29:04 PST 2024


================
@@ -6571,11 +6571,14 @@ class AtomicExpr : public Expr {
   /// \return empty atomic scope model if the atomic op code does not have
   ///   scope operand.
   static std::unique_ptr<AtomicScopeModel> getScopeModel(AtomicOp Op) {
-    if (Op >= AO__opencl_atomic_load && Op <= AO__opencl_atomic_fetch_max)
+    // FIXME: Allow grouping of builtins to be able to only check >= and <=
+    if (Op >= AO__opencl_atomic_compare_exchange_strong &&
+        Op <= AO__opencl_atomic_store && Op != AO__opencl_atomic_init)
----------------
philnik777 wrote:

Is adding the `Op != AO__opencl_atomic_init` here acceptable?

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


More information about the cfe-commits mailing list