[OPENMP]Fix PR39422: variables are not firstprivatized in task context.
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 25 Oct 2018 15:35:27 +0000 (15:35 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 25 Oct 2018 15:35:27 +0000 (15:35 +0000)
commit8fc7b5f92217bc28e911ca27e20d2880e412aa06
treec693aa62309f078c5a3712d5683bdfacc3837a1d
parent8f11ddc397471379a71fa86345e13d35d1ea5fdc
[OPENMP]Fix PR39422: variables are not firstprivatized in task context.

According to the OpenMP standard, In a task generating construct, if no
default clause is present, a variable for which the data-sharing
attribute is not determined by the rules above is firstprivatized.
Compiler tries to implement this, but if the variable is not directly
used in the task context, this variable may not be firstprivatized.
Patch fixes this problem.

llvm-svn: 345277
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/parallel_sections_default_messages.cpp
clang/test/OpenMP/task_codegen.cpp