[OPENMP] Allow to use global variables as lcv in loop-based directives.
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 30 Apr 2015 04:23:23 +0000 (04:23 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 30 Apr 2015 04:23:23 +0000 (04:23 +0000)
commit9c821037434dc106543d6905f5519b1129eb904f
tree606d74503746bf46ee86c1491b27b1cc190dfb05
parentf8a16a952dddaf1d38d6f596b78b1041ce5ea2eb
[OPENMP] Allow to use global variables as lcv in loop-based directives.

For proper codegen we need to capture variable in the OpenMP region. In loop-based directives loop control variables are private by default and they must be captured in this region. There was a problem with capturing of globals, used as lcv, as they was not marked as private by default.
Differential Revision: http://reviews.llvm.org/D9336

llvm-svn: 236201
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseStmt.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/for_codegen.cpp
clang/test/OpenMP/for_loop_messages.cpp
clang/test/OpenMP/for_simd_loop_messages.cpp
clang/test/OpenMP/parallel_for_loop_messages.cpp
clang/test/OpenMP/parallel_for_simd_loop_messages.cpp
clang/test/OpenMP/simd_loop_messages.cpp