[OPENMP]Fix PR39084: Check datasharing attributes of reduction variables only.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 28 Sep 2018 19:33:14 +0000 (19:33 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 28 Sep 2018 19:33:14 +0000 (19:33 +0000)
commitbc52967835fd22933d01bc6ea55ff79f37e1f211
tree6e0a52bf0cf263565c65923c5810a4a7e37cd2e2
parent98aa64342046d70105f031a13daac816f9e55943
[OPENMP]Fix PR39084: Check datasharing attributes of reduction variables only.

According to OpenMP, the reduction item must be shared in parent region.
But the item can be an array section or array subscript. In this case,
we should not check for the datasharing of the base declaration.

llvm-svn: 343356
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/for_ast_print.cpp
clang/test/OpenMP/for_reduction_messages.cpp