summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticSemaKinds.td
diff options
context:
space:
mode:
authorEgor Churaev <egor.churaev@gmail.com>2017-04-05 12:47:10 +0000
committerEgor Churaev <egor.churaev@gmail.com>2017-04-05 12:47:10 +0000
commit6dbc85b44bd268240bc4969c4a77fbdf2a3d8cac (patch)
tree35285d771c6ec6f218db603892ccb0a0991612a1 /include/clang/Basic/DiagnosticSemaKinds.td
parent9d30cffd638f057a4c0cd5bdf7d2d9cfc4c792c6 (diff)
[OpenCL] Extended diagnostics for atomic initialization
Summary: 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 can be initialize only in global scope. I think that we can discuss this change. Reviewers: Anastasia, cfe-commits Reviewed By: Anastasia Subscribers: bader, yaxunl Differential Revision: https://reviews.llvm.org/D30643 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index cdf0d4680d..e593ab9419 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -8286,9 +8286,9 @@ def err_opencl_return_value_with_address_space : Error<
"return value cannot be qualified with address space">;
def err_opencl_constant_no_init : Error<
"variable in constant address space must be initialized">;
-def err_atomic_init_constant : Error<
- "atomic variable can only be assigned to a compile time constant"
- " in the declaration statement in the program scope">;
+def err_opencl_atomic_init: Error<
+ "atomic variable can be %select{assigned|initialized}0 to a variable only "
+ "in global address space">;
def err_opencl_implicit_vector_conversion : Error<
"implicit conversions between vector types (%0 and %1) are not permitted">;
def err_opencl_invalid_type_array : Error<