[OPENMP]Fix PR48740: OpenMP declare reduction in C does not require an initializer
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 29 Mar 2021 20:45:05 +0000 (13:45 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 30 Mar 2021 12:38:20 +0000 (05:38 -0700)
commit1696b8ae96b2d8bcbf90894bd344a8a090f43c84
tree5e148e7d37682e239dd3a207989497acfdee6406
parent2b30bd2be0a898d0e7cb9eb3f2cf0e0efeaa83e9
[OPENMP]Fix PR48740: OpenMP declare reduction in C does not require an initializer

If no initializer-clause is specified, the private variables will be
initialized following the rules for initialization of objects with static
storage duration.

Need to adjust the implementation to the current version of the
standard.

Differential Revision: https://reviews.llvm.org/D99539
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/declare_reduction_ast_print.c
clang/test/OpenMP/declare_reduction_codegen.c
clang/test/OpenMP/declare_reduction_messages.c