[OPENMP]Honor constantness of captured variables.
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 17 Nov 2020 17:30:33 +0000 (09:30 -0800)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 20 Nov 2020 19:11:47 +0000 (11:11 -0800)
commit8f51dc49673c494cc1d118979b596288e938af13
treed4fc976fe34b8585d225e9e2cd25cbca91f8c38c
parent06c192d454767376771e8fed4ddcf8a461723e32
[OPENMP]Honor constantness of captured variables.

Fixes bug reported via Stackoverflow:
https://stackoverflow.com/questions/64179168/clang-overload-resolution-failure-with-templates-and-openmp-collapse

Need to honor constantness of private/target variables to  make the code
compilable.

Differential Revision: https://reviews.llvm.org/D91644
clang/lib/Sema/SemaExpr.cpp
clang/test/OpenMP/distribute_firstprivate_messages.cpp
clang/test/OpenMP/openmp_capture_const_var_ast_print.cpp [new file with mode: 0644]
clang/test/OpenMP/teams_distribute_firstprivate_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp
clang/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp