Lines Matching refs:DVar

261     DSAVarData DVar = getTopDSA(D, false);  in isThreadPrivate()  local
262 return isOpenMPThreadPrivate(DVar.CKind); in isThreadPrivate()
369 DSAVarData DVar; in getDSA() local
377 DVar.CKind = OMPC_shared; in getDSA()
384 DVar.CKind = OMPC_shared; in getDSA()
386 return DVar; in getDSA()
389 DVar.DKind = Iter->Directive; in getDSA()
396 DVar.CKind = OMPC_private; in getDSA()
397 return DVar; in getDSA()
403 DVar.RefExpr = Iter->SharingMap[D].RefExpr; in getDSA()
404 DVar.CKind = Iter->SharingMap[D].Attributes; in getDSA()
405 DVar.ImplicitDSALoc = Iter->DefaultAttrLoc; in getDSA()
406 return DVar; in getDSA()
415 DVar.CKind = OMPC_shared; in getDSA()
416 DVar.ImplicitDSALoc = Iter->DefaultAttrLoc; in getDSA()
417 return DVar; in getDSA()
419 return DVar; in getDSA()
425 DVar.ImplicitDSALoc = Iter->DefaultAttrLoc; in getDSA()
426 if (isOpenMPParallelDirective(DVar.DKind) || in getDSA()
427 isOpenMPTeamsDirective(DVar.DKind)) { in getDSA()
428 DVar.CKind = OMPC_shared; in getDSA()
429 return DVar; in getDSA()
437 if (DVar.DKind == OMPD_task) { in getDSA()
449 DVar.RefExpr = nullptr; in getDSA()
450 DVar.DKind = OMPD_task; in getDSA()
451 DVar.CKind = OMPC_firstprivate; in getDSA()
452 return DVar; in getDSA()
457 DVar.DKind = OMPD_task; in getDSA()
458 DVar.CKind = in getDSA()
460 return DVar; in getDSA()
559 DSAVarData DVar; in getTopDSA() local
575 DVar.RefExpr = Stack[0].SharingMap[D].RefExpr; in getTopDSA()
576 DVar.CKind = OMPC_threadprivate; in getTopDSA()
577 return DVar; in getTopDSA()
591 return DVar; in getTopDSA()
593 DVar.CKind = OMPC_shared; in getTopDSA()
594 return DVar; in getTopDSA()
616 return DVar; in getTopDSA()
618 DVar.CKind = OMPC_shared; in getTopDSA()
619 return DVar; in getTopDSA()
631 DVar.RefExpr = I->SharingMap[D].RefExpr; in getTopDSA()
632 DVar.CKind = I->SharingMap[D].Attributes; in getTopDSA()
633 DVar.ImplicitDSALoc = I->DefaultAttrLoc; in getTopDSA()
636 return DVar; in getTopDSA()
662 DSAVarData DVar = getDSA(I, D); in hasDSA() local
663 if (CPred(DVar.CKind)) in hasDSA()
664 return DVar; in hasDSA()
682 DSAVarData DVar = getDSA(I, D); in hasInnermostDSA() local
683 if (CPred(DVar.CKind)) in hasInnermostDSA()
684 return DVar; in hasInnermostDSA()
928 auto DVar = DSAStack->getTopDSA(VD, false); in EndOpenMPDSABlock() local
929 if (DVar.CKind == OMPC_lastprivate) { in EndOpenMPDSABlock()
1227 const VarDecl *VD, DSAStackTy::DSAVarData DVar, in ReportOriginalDSA() argument
1229 if (DVar.RefExpr) { in ReportOriginalDSA()
1230 SemaRef.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_explicit_dsa) in ReportOriginalDSA()
1231 << getOpenMPClauseName(DVar.CKind); in ReportOriginalDSA()
1249 if (DVar.CKind == OMPC_private) in ReportOriginalDSA()
1251 else if (DVar.CKind == OMPC_lastprivate) in ReportOriginalDSA()
1255 } else if (DVar.DKind == OMPD_task && DVar.CKind == OMPC_firstprivate) { in ReportOriginalDSA()
1257 ReportLoc = DVar.ImplicitDSALoc; in ReportOriginalDSA()
1266 else if (VD->isLocalVarDecl() && DVar.CKind == OMPC_private) { in ReportOriginalDSA()
1274 } else if (DVar.ImplicitDSALoc.isValid()) { in ReportOriginalDSA()
1275 SemaRef.Diag(DVar.ImplicitDSALoc, diag::note_omp_implicit_dsa) in ReportOriginalDSA()
1276 << getOpenMPClauseName(DVar.CKind); in ReportOriginalDSA()
1296 auto DVar = Stack->getTopDSA(VD, false); in VisitDeclRefExpr() local
1298 if (DVar.RefExpr) return; in VisitDeclRefExpr()
1306 if (DVar.CKind == OMPC_unknown && Stack->getDefaultDSA() == DSA_none && in VisitDeclRefExpr()
1317 DVar = Stack->hasInnermostDSA(VD, MatchesAnyClause(OMPC_reduction), in VisitDeclRefExpr()
1324 if (DKind == OMPD_task && DVar.CKind == OMPC_reduction) { in VisitDeclRefExpr()
1327 ReportOriginalDSA(SemaRef, Stack, VD, DVar); in VisitDeclRefExpr()
1332 DVar = Stack->getImplicitDSA(VD, false); in VisitDeclRefExpr()
1333 if (DKind == OMPD_task && DVar.CKind != OMPC_shared) in VisitDeclRefExpr()
3462 DSAStackTy::DSAVarData DVar = DSA.getTopDSA(Var, false); in CheckOpenMPIterationSpace() local
3470 if (((isOpenMPSimdDirective(DKind) && DVar.CKind != OMPC_unknown && in CheckOpenMPIterationSpace()
3471 DVar.CKind != OMPC_threadprivate && DVar.CKind != PredeterminedCKind) || in CheckOpenMPIterationSpace()
3474 !isOpenMPSimdDirective(DKind) && DVar.CKind != OMPC_unknown && in CheckOpenMPIterationSpace()
3475 DVar.CKind != OMPC_private && DVar.CKind != OMPC_lastprivate && in CheckOpenMPIterationSpace()
3476 DVar.CKind != OMPC_threadprivate)) && in CheckOpenMPIterationSpace()
3477 ((DVar.CKind != OMPC_private && DVar.CKind != OMPC_threadprivate) || in CheckOpenMPIterationSpace()
3478 DVar.RefExpr != nullptr)) { in CheckOpenMPIterationSpace()
3480 << getOpenMPClauseName(DVar.CKind) << getOpenMPDirectiveName(DKind) in CheckOpenMPIterationSpace()
3482 if (DVar.RefExpr == nullptr) in CheckOpenMPIterationSpace()
3483 DVar.CKind = PredeterminedCKind; in CheckOpenMPIterationSpace()
3484 ReportOriginalDSA(SemaRef, &DSA, Var, DVar, /*IsLoopIterVar=*/true); in CheckOpenMPIterationSpace()
3491 if (DVar.CKind == OMPC_unknown) in CheckOpenMPIterationSpace()
3492 DVar = DSA.hasDSA(Var, isOpenMPPrivate, MatchesAlways(), in CheckOpenMPIterationSpace()
6380 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPPrivateClause() local
6381 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_private) { in ActOnOpenMPPrivateClause()
6382 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPPrivateClause()
6384 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPPrivateClause()
6517 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPFirstprivateClause() local
6523 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_firstprivate && in ActOnOpenMPFirstprivateClause()
6524 DVar.CKind != OMPC_lastprivate && DVar.RefExpr) { in ActOnOpenMPFirstprivateClause()
6526 << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPFirstprivateClause()
6528 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6543 if (!(IsConstant || VD->isStaticDataMember()) && !DVar.RefExpr && in ActOnOpenMPFirstprivateClause()
6544 DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared) { in ActOnOpenMPFirstprivateClause()
6546 << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPFirstprivateClause()
6548 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6560 DVar = DSAStack->getImplicitDSA(VD, true); in ActOnOpenMPFirstprivateClause()
6561 if (DVar.CKind != OMPC_shared && in ActOnOpenMPFirstprivateClause()
6562 (isOpenMPParallelDirective(DVar.DKind) || in ActOnOpenMPFirstprivateClause()
6563 DVar.DKind == OMPD_unknown)) { in ActOnOpenMPFirstprivateClause()
6567 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6583 DVar = in ActOnOpenMPFirstprivateClause()
6590 if (DVar.CKind == OMPC_reduction && in ActOnOpenMPFirstprivateClause()
6591 (isOpenMPParallelDirective(DVar.DKind) || in ActOnOpenMPFirstprivateClause()
6592 isOpenMPWorksharingDirective(DVar.DKind))) { in ActOnOpenMPFirstprivateClause()
6594 << getOpenMPDirectiveName(DVar.DKind); in ActOnOpenMPFirstprivateClause()
6595 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6614 DVar = DSAStack->hasInnermostDSA(VD, MatchesAnyClause(OMPC_private), in ActOnOpenMPFirstprivateClause()
6619 if (DVar.CKind == OMPC_private && isOpenMPTeamsDirective(DVar.DKind)) { in ActOnOpenMPFirstprivateClause()
6621 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6624 DVar = DSAStack->hasInnermostDSA(VD, MatchesAnyClause(OMPC_reduction), in ActOnOpenMPFirstprivateClause()
6629 if (DVar.CKind == OMPC_reduction && in ActOnOpenMPFirstprivateClause()
6630 isOpenMPTeamsDirective(DVar.DKind)) { in ActOnOpenMPFirstprivateClause()
6632 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6635 DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPFirstprivateClause()
6636 if (DVar.CKind == OMPC_lastprivate) { in ActOnOpenMPFirstprivateClause()
6638 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPFirstprivateClause()
6778 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPLastprivateClause() local
6779 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_lastprivate && in ActOnOpenMPLastprivateClause()
6780 DVar.CKind != OMPC_firstprivate && in ActOnOpenMPLastprivateClause()
6781 (DVar.CKind != OMPC_private || DVar.RefExpr != nullptr)) { in ActOnOpenMPLastprivateClause()
6783 << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPLastprivateClause()
6785 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPLastprivateClause()
6796 DSAStackTy::DSAVarData TopDVar = DVar; in ActOnOpenMPLastprivateClause()
6799 DVar = DSAStack->getImplicitDSA(VD, true); in ActOnOpenMPLastprivateClause()
6800 if (DVar.CKind != OMPC_shared) { in ActOnOpenMPLastprivateClause()
6804 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPLastprivateClause()
6842 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPLastprivateClause() local
6843 if (DVar.CKind == OMPC_firstprivate) { in ActOnOpenMPLastprivateClause()
6845 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPLastprivateClause()
6907 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPSharedClause() local
6908 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared && in ActOnOpenMPSharedClause()
6909 DVar.RefExpr) { in ActOnOpenMPSharedClause()
6910 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPSharedClause()
6912 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPSharedClause()
6933 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(VD, false); in VisitDeclRefExpr() local
6934 if (DVar.CKind == OMPC_shared && !DVar.RefExpr) in VisitDeclRefExpr()
6936 if (DVar.CKind != OMPC_unknown) in VisitDeclRefExpr()
7239 DSAStackTy::DSAVarData DVar; in ActOnOpenMPReductionClause() local
7240 DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPReductionClause()
7241 if (DVar.CKind == OMPC_reduction) { in ActOnOpenMPReductionClause()
7244 if (DVar.RefExpr) { in ActOnOpenMPReductionClause()
7245 Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_referenced); in ActOnOpenMPReductionClause()
7247 } else if (DVar.CKind != OMPC_unknown) { in ActOnOpenMPReductionClause()
7249 << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPReductionClause()
7251 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPReductionClause()
7262 DVar = DSAStack->getImplicitDSA(VD, true); in ActOnOpenMPReductionClause()
7263 if (DVar.CKind != OMPC_shared) { in ActOnOpenMPReductionClause()
7267 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPReductionClause()
7507 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPLinearClause() local
7508 if (DVar.RefExpr) { in ActOnOpenMPLinearClause()
7509 Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPLinearClause()
7511 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPLinearClause()
7899 auto DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPCopyprivateClause() local
7900 if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_copyprivate && in ActOnOpenMPCopyprivateClause()
7901 DVar.RefExpr) { in ActOnOpenMPCopyprivateClause()
7903 << getOpenMPClauseName(DVar.CKind) in ActOnOpenMPCopyprivateClause()
7905 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPCopyprivateClause()
7912 if (DVar.CKind == OMPC_unknown) { in ActOnOpenMPCopyprivateClause()
7913 DVar = DSAStack->getImplicitDSA(VD, false); in ActOnOpenMPCopyprivateClause()
7914 if (DVar.CKind == OMPC_shared) { in ActOnOpenMPCopyprivateClause()
7918 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPCopyprivateClause()
8195 auto DVar = DSAStack->getTopDSA(VD, false); in ActOnOpenMPMapClause() local
8197 ReportOriginalDSA(*this, DSAStack, VD, DVar); in ActOnOpenMPMapClause()