Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
https://reviews.llvm.org/D30643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman
echuraev updated this revision to Diff 93837.
echuraev marked an inline comment as done.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
test/Parser/opencl-atomics-cl20.cl
test/SemaOpenCL/atomic-init.cl
Inde
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}}
+ atomic_int a2 = 0; // expected-error {{atomic variable ca
echuraev updated this revision to Diff 93602.
echuraev marked an inline comment as done.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
test/Parser/opencl-atomics-cl20.cl
test/SemaOpenCL/atomic-init.cl
Inde
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
echuraev updated this revision to Diff 93368.
echuraev marked 2 inline comments as done.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
test/Parser/opencl-atomics-cl20.cl
test/SemaOpenCL/atomic-init.cl
Inde
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
echuraev updated this revision to Diff 93113.
echuraev marked 2 inline comments as done.
echuraev removed a reviewer: bader.
echuraev added a subscriber: bader.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
te
bader added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
Anastasia added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
bader added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
echuraev updated this revision to Diff 91536.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
test/Parser/opencl-atomics-cl20.cl
test/SemaOpenCL/atomic-init.cl
Index: test/SemaOpenCL/atomic-init.cl
=
bader added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
Anastasia added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
echuraev added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
echuraev updated this revision to Diff 91305.
echuraev marked 2 inline comments as done.
https://reviews.llvm.org/D30643
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaInit.cpp
test/SemaOpenCL/atomic-init.cl
Index: test/SemaOpenCL/atomic-init.cl
===
Anastasia added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263
+def err_atomic_init_addressspace : Error<
+ "initialization of atomic variables is restricted to variables in global
address space">;
def err_atomic_init_constant : Error<
---
echuraev created this revision.
Herald added a subscriber: yaxunl.
I saw the same changes in the following review: https://reviews.llvm.org/D17438
I don't know in that way I could determine that atomic variable was initialized
by macro ATOMIC_VAR_INIT. Anyway I added check that atomic variables
18 matches
Mail list logo