[OPENMP]PR47606: Do not update the lastprivate item if it was captured by reference...
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 23 Sep 2020 19:27:51 +0000 (15:27 -0400)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 24 Sep 2020 17:14:13 +0000 (13:14 -0400)
commita9fca98ee4f653278d84713caecd152fef8494f5
tree55a77631efbf7eb734a669661baf2048d36ea87e
parentbd44558001e978d93fbff5a4537f38b46b0e355a
[OPENMP]PR47606: Do not update the lastprivate item if it was captured by reference as firstprivate data member.

No need to make final copy from the firsptrivate/lastprivate copy to the original item if the item is a data memeber.
Firstprivate copy creates a copy by reference and the original item gets
updated correctly when updating the lastprivate shared variable.

Differential Revision: https://reviews.llvm.org/D88179
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/for_lastprivate_codegen.cpp