Lines Matching refs:DVar
189 DSAVarData DVar = getTopDSA(D);
190 return isOpenMPThreadPrivate(DVar.CKind);
201 DSAVarData DVar;
209 DVar.CKind = OMPC_shared;
216 DVar.CKind = OMPC_shared;
218 return DVar;
221 DVar.DKind = Iter->Directive;
228 DVar.CKind = OMPC_private;
229 return DVar;
235 DVar.RefExpr = Iter->SharingMap[D].RefExpr;
236 DVar.CKind = Iter->SharingMap[D].Attributes;
237 return DVar;
246 DVar.CKind = OMPC_shared;
247 DVar.ImplicitDSALoc = Iter->DefaultAttrLoc;
248 return DVar;
250 return DVar;
256 DVar.ImplicitDSALoc = Iter->DefaultAttrLoc;
257 if (isOpenMPParallelDirective(DVar.DKind)) {
258 DVar.CKind = OMPC_shared;
259 return DVar;
267 if (DVar.DKind == OMPD_task) {
280 DVar.RefExpr = nullptr;
281 DVar.DKind = OMPD_task;
282 DVar.CKind = OMPC_firstprivate;
283 return DVar;
288 DVar.DKind = OMPD_task;
289 DVar.CKind =
291 return DVar;
347 DSAVarData DVar;
353 DVar.CKind = OMPC_threadprivate;
354 return DVar;
357 DVar.RefExpr = Stack[0].SharingMap[D].RefExpr;
358 DVar.CKind = OMPC_threadprivate;
359 return DVar;
370 DVar.CKind = OMPC_private;
371 return DVar;
384 return DVar;
386 DVar.CKind = OMPC_shared;
387 return DVar;
409 return DVar;
411 DVar.CKind = OMPC_shared;
412 return DVar;
420 DVar.CKind = OMPC_shared;
421 return DVar;
427 DVar.RefExpr = Stack.back().SharingMap[D].RefExpr;
428 DVar.CKind = Stack.back().SharingMap[D].Attributes;
431 return DVar;
446 DSAVarData DVar = getDSA(I, D);
447 if (CPred(DVar.CKind))
448 return DVar;
460 DSAVarData DVar = getDSA(I, D);
461 if (CPred(DVar.CKind))
462 return DVar;
496 auto DVar = DSAStack->getTopDSA(VD);
497 if (DVar.CKind == OMPC_lastprivate) {
783 const VarDecl *VD, DSAStackTy::DSAVarData DVar,
785 if (DVar.RefExpr) {
786 SemaRef.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_explicit_dsa)
787 << getOpenMPClauseName(DVar.CKind);
803 if (DVar.CKind == OMPC_private)
805 else if (DVar.CKind == OMPC_lastprivate)
817 else if (VD->isLocalVarDecl() && DVar.CKind == OMPC_private) {
825 } else if (DVar.ImplicitDSALoc.isValid()) {
826 SemaRef.Diag(DVar.ImplicitDSALoc, diag::note_omp_implicit_dsa)
827 << getOpenMPClauseName(DVar.CKind);
850 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(VD);
851 if (DVar.CKind != OMPC_unknown) {
852 if (DKind == OMPD_task && DVar.CKind != OMPC_shared &&
853 !Stack->isThreadPrivate(VD) && !DVar.RefExpr)
854 ImplicitFirstprivate.push_back(DVar.RefExpr);
861 if (DVar.CKind == OMPC_unknown && Stack->getDefaultDSA() == DSA_none &&
872 DVar = Stack->hasInnermostDSA(VD, MatchesAnyClause(OMPC_reduction),
874 if (DKind == OMPD_task && DVar.CKind == OMPC_reduction) {
877 ReportOriginalDSA(SemaRef, Stack, VD, DVar);
882 DVar = Stack->getImplicitDSA(VD);
883 if (DKind == OMPD_task && DVar.CKind != OMPC_shared)
884 ImplicitFirstprivate.push_back(DVar.RefExpr);
1654 DSAStackTy::DSAVarData DVar = DSA.getTopDSA(Var);
1659 if (((isOpenMPSimdDirective(DKind) && DVar.CKind != OMPC_unknown &&
1660 DVar.CKind != PredeterminedCKind) ||
1661 (isOpenMPWorksharingDirective(DKind) && DVar.CKind != OMPC_unknown &&
1662 DVar.CKind != OMPC_private && DVar.CKind != OMPC_lastprivate)) &&
1663 (DVar.CKind != OMPC_private || DVar.RefExpr != nullptr)) {
1665 << getOpenMPClauseName(DVar.CKind) << getOpenMPDirectiveName(DKind)
1667 ReportOriginalDSA(SemaRef, &DSA, Var, DVar, true);
2497 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
2498 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_private) {
2499 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind)
2501 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2621 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
2629 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_firstprivate &&
2630 DVar.CKind != OMPC_lastprivate && DVar.RefExpr) {
2632 << getOpenMPClauseName(DVar.CKind)
2634 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2649 if (!(IsConstant || VD->isStaticDataMember()) && !DVar.RefExpr &&
2650 DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared) {
2652 << getOpenMPClauseName(DVar.CKind)
2654 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2666 DVar = DSAStack->getImplicitDSA(VD);
2667 if (DVar.CKind != OMPC_shared) {
2671 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2758 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
2759 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_lastprivate &&
2760 DVar.CKind != OMPC_firstprivate &&
2761 (DVar.CKind != OMPC_private || DVar.RefExpr != nullptr)) {
2763 << getOpenMPClauseName(DVar.CKind)
2765 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2778 DVar = DSAStack->getImplicitDSA(VD);
2779 if (DVar.CKind != OMPC_shared) {
2783 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2844 if (DVar.CKind != OMPC_firstprivate)
2898 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
2899 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared &&
2900 DVar.RefExpr) {
2901 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind)
2903 ReportOriginalDSA(*this, DSAStack, VD, DVar);
2924 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(VD);
2925 if (DVar.CKind == OMPC_shared && !DVar.RefExpr)
2927 if (DVar.CKind != OMPC_unknown)
3148 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
3149 if (DVar.CKind == OMPC_reduction) {
3152 if (DVar.RefExpr) {
3153 Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_referenced);
3155 } else if (DVar.CKind != OMPC_unknown) {
3157 << getOpenMPClauseName(DVar.CKind)
3159 ReportOriginalDSA(*this, DSAStack, VD, DVar);
3170 DVar = DSAStack->getImplicitDSA(VD);
3171 if (DVar.CKind != OMPC_shared) {
3175 ReportOriginalDSA(*this, DSAStack, VD, DVar);
3278 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
3279 if (DVar.RefExpr) {
3280 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind)
3282 ReportOriginalDSA(*this, DSAStack, VD, DVar);
3561 auto DVar = DSAStack->getTopDSA(VD);
3562 if (DVar.CKind != OMPC_copyprivate && DVar.CKind != OMPC_unknown &&
3563 !(DVar.CKind == OMPC_private && !DVar.RefExpr)) {
3565 << getOpenMPClauseName(DVar.CKind)
3567 ReportOriginalDSA(*this, DSAStack, VD, DVar);
3574 if (DVar.CKind == OMPC_unknown) {
3575 DVar = DSAStack->getImplicitDSA(VD);
3576 if (DVar.CKind == OMPC_shared) {
3580 ReportOriginalDSA(*this, DSAStack, VD, DVar);