[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
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 3 additions, 3 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/SemaExpr.cpp 1 addition, 1 deletionlib/Sema/SemaExpr.cpp
- lib/Sema/SemaInit.cpp 14 additions, 0 deletionslib/Sema/SemaInit.cpp
- test/Parser/opencl-atomics-cl20.cl 1 addition, 1 deletiontest/Parser/opencl-atomics-cl20.cl
- test/SemaOpenCL/atomic-init.cl 12 additions, 0 deletionstest/SemaOpenCL/atomic-init.cl
Loading
Please register or sign in to comment