]> granicus.if.org Git - clang/commit
[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)
commitd0e625611a370ed08b1179e46a45da34a651d0af
treea6d1eb48f1cc3e72debe8ca3ee8cb45eac86528d
parentf7b7bb1775b393a376b74dc23be4e265b2bfb317
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347096 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOpenMP.cpp
test/OpenMP/nvptx_lambda_capturing.cpp