[PATCH] D47618: __c11_atomic_load's _Atomic can be const
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 27 08:27:35 PDT 2018
Anastasia added inline comments.
================
Comment at: test/SemaOpenCL/atomic-ops.cl:61
__opencl_atomic_load(d, memory_order_seq_cst, memory_scope_work_group);
- __opencl_atomic_load(ci, memory_order_seq_cst, memory_scope_work_group); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const __generic atomic_int *' (aka 'const __generic _Atomic(int) *') invalid)}}
+ __opencl_atomic_load(ci, memory_order_seq_cst, memory_scope_work_group);
----------------
Could we add a line with constant AS pointer:
__opencl_atomic_load(i_c, memory_order_seq_cst, memory_scope_work_group);
Just to make sure we still give an error for this case.
Repository:
rC Clang
https://reviews.llvm.org/D47618
More information about the cfe-commits
mailing list