diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-11-18 10:14:22 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-11-18 10:14:22 +0000 |
commit | 218a5b5c176af36bebec0c0b67c53fa921710d36 (patch) | |
tree | f13f7fe8d6f3367d9a7d4ef2ff37b7c39b9ae05c /include/clang/Basic/DiagnosticSemaKinds.td | |
parent | 6e94fa58c39ec536909e795ebb9bf3480ee4a36f (diff) |
[OPENMP] Additional processing of 'omp atomic read' directive.
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index c175b98342..d01a2d62bd 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -7322,7 +7322,9 @@ def err_omp_parallel_reduction_in_task_firstprivate : Error< "argument of a reduction clause of a %0 construct must not appear in a firstprivate clause on a task construct">; def err_omp_atomic_read_not_expression_statement : Error< "the statement for 'atomic read' must be an expression statement of form 'v = x;'," - " where v and x are both l-value expressions with scalar type">; + " where v and x are both lvalue expressions with scalar type">; +def note_omp_atomic_read: Note< + "%select{expected an expression statement|expected built-in assignment operator|expected expression of scalar type|expected lvalue expression}0">; def err_omp_atomic_write_not_expression_statement : Error< "the statement for 'atomic write' must be an expression statement of form 'x = expr;'," " where x is an l-value expression with scalar type">; |