[clang] [clang][sema] make sure arguments of __atomic_exchange complete type (PR #75135)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 3 06:59:13 PST 2024


================
@@ -7885,6 +7885,18 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
   if ((IsOpenCL || IsHIP || IsScoped) &&
       Op != AtomicExpr::AO__opencl_atomic_init)
     ++AdjustedNumArgs;
+
+  // Verify if the arguments are of type CompleteType
----------------
erichkeane wrote:

When doing so, please see if you can 'extract' this to a function, something like;

`RequireAtomicArgs(Args)` kind of thing.

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


More information about the cfe-commits mailing list