[OPENMP]Fix PR52117: Crash caused by target region inside of task construct.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 24 Nov 2021 17:52:46 +0000 (09:52 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Fri, 3 Dec 2021 15:01:00 +0000 (07:01 -0800)
commitf6279562dae456f6c58d5f7484ba4bae5c2071fa
treee421c742b20cd4359161e813620547f1de096034
parent54dc03b97bfac40dacd8a0cb5f03381842b20422
[OPENMP]Fix PR52117: Crash caused by target region inside of task construct.

Need to do the analysis of the captured expressions in the clauses.
Previously the compiler ignored them and it may lead to a compiler crash
trying to get the address of the mapped variables.

Differential Revision: https://reviews.llvm.org/D114546
clang/lib/Sema/SemaOpenMP.cpp
clang/test/Analysis/cfg-openmp.cpp
clang/test/OpenMP/task_target_device_codegen.c [new file with mode: 0644]
clang/test/OpenMP/taskloop_codegen.cpp