[OPENMP]Fix PR50929: Ignored initializer clause in user-defined reduction.

No need to try to create the default constructor for private copy, it
will be called automatically in the initializer of the declare
reduction. Fixes balance between constructors/destructors calls.

Differential Revision: https://reviews.llvm.org/D105143
This commit is contained in:
Alexey Bataev 2021-06-29 12:26:37 -07:00
parent 2fd75507d1
commit 7fab1146e4
2 changed files with 560 additions and 721 deletions

View File

@ -17069,7 +17069,6 @@ static bool actOnOMPReductionKindClause(
auto *DRDRef = DeclareReductionRef.getAs<DeclRefExpr>();
auto *DRD = cast<OMPDeclareReductionDecl>(DRDRef->getDecl());
if (DRD->getInitializer()) {
S.ActOnUninitializedDecl(PrivateVD);
Init = DRDRef;
RHSVD->setInit(DRDRef);
RHSVD->setInitStyle(VarDecl::CallInit);

File diff suppressed because it is too large Load Diff