================ @@ -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:
I'd rather land this patch and improve things in follow-ups, since the refactoring is quite large and I'd like to avoid searching for added builtins again. I've thought about adding something similar to the `InGroup<SomeGroup>` we have for diagnostics, but I don't have a patch yet. Maybe something like `InBuiltinRange<C11AtomicRange>`. That should make it trivial to teach tablegen to group the builtins, and maybe even generate functions to check whether a builtin is in a given range. https://github.com/llvm/llvm-project/pull/68324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits