[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 10:35:13 PDT 2017


Anastasia added inline comments.


================
Comment at: test/SemaOpenCL/atomic-init.cl:6
+kernel void test_atomic_initialization() {
+  a1 = 1; // expected-error {{atomic variable can only be assigned to a compile time constant and to variables in global adress space}}
+  atomic_int a2 = 0; // expected-error {{atomic variable can only be assigned to a compile time constant and to variables in global adress space}}
----------------
Anastasia wrote:
> Btw, you could keep "initialized" here by using 'select' in the diagnostic message. 
Btw you still keep "assigned" in the error message. What I mean is that we could put "initialized" instead in this case.


https://reviews.llvm.org/D30643





More information about the cfe-commits mailing list