[OPENMP]Fix PR39694: do not capture `this` in non-`this` region.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 16 Nov 2018 21:13:33 +0000 (21:13 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 16 Nov 2018 21:13:33 +0000 (21:13 +0000)
commitd1840e5383a9751c534fd3715ab24a497bc54295
tree801bf8b30c20c59d803293b3883030b206495235
parent567aaeb40d615b81465727a5fcdeb9a852e97e3f
[OPENMP]Fix PR39694: do not capture `this` in non-`this` region.

If lambda is used inside of the OpenMP region and captures `this`, we
should recapture it in the OpenMP region also. But we should do this
only if the OpenMP region is used in the context of the same class, just
like the lambda.

llvm-svn: 347096
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/nvptx_lambda_capturing.cpp