Lines Matching refs:SemaRef

60     Sema &SemaRef, Expr *E,
245 Sema &SemaRef; member in __anon1dd12e440111::DSAStackTy
350 explicit DSAStackTy(Sema &S) : SemaRef(S) {} in DSAStackTy()
478 const FunctionScopeInfo *CurFnScope = SemaRef.getCurFunction(); in pushFunction()
491 for (const FunctionScopeInfo *FSI : llvm::reverse(SemaRef.FunctionScopes)) { in popFunction()
704 SemaRef.Diag(CNew->getBeginLoc(), in hasDuplicateRequiresClause()
707 SemaRef.Diag(CPrev->getBeginLoc(), in hasDuplicateRequiresClause()
1553 static VarDecl *buildVarDecl(Sema &SemaRef, SourceLocation Loc, QualType Type, in buildVarDecl() argument
1556 DeclContext *DC = SemaRef.CurContext; in buildVarDecl()
1557 IdentifierInfo *II = &SemaRef.PP.getIdentifierTable().get(Name); in buildVarDecl()
1558 TypeSourceInfo *TInfo = SemaRef.Context.getTrivialTypeSourceInfo(Type, Loc); in buildVarDecl()
1560 VarDecl::Create(SemaRef.Context, DC, Loc, Loc, II, Type, TInfo, SC_None); in buildVarDecl()
1569 OMPReferencedVarAttr::CreateImplicit(SemaRef.Context, OrigRef)); in buildVarDecl()
1602 VarDecl *VD = buildVarDecl(SemaRef, SR.getBegin(), in addTaskgroupReductionData()
1603 SemaRef.Context.VoidPtrTy, ".task_red."); in addTaskgroupReductionData()
1605 buildDeclRefExpr(SemaRef, VD, SemaRef.Context.VoidPtrTy, SR.getBegin()); in addTaskgroupReductionData()
1627 VarDecl *VD = buildVarDecl(SemaRef, SR.getBegin(), in addTaskgroupReductionData()
1628 SemaRef.Context.VoidPtrTy, ".task_red."); in addTaskgroupReductionData()
1630 buildDeclRefExpr(SemaRef, VD, SemaRef.Context.VoidPtrTy, SR.getBegin()); in addTaskgroupReductionData()
1709 static bool isConstNotMutableType(Sema &SemaRef, QualType Type, in isConstNotMutableType() argument
1712 ASTContext &Context = SemaRef.getASTContext(); in isConstNotMutableType()
1716 const CXXRecordDecl *RD = AcceptIfMutable && SemaRef.getLangOpts().CPlusPlus in isConstNotMutableType()
1724 return IsConstant && !(SemaRef.getLangOpts().CPlusPlus && RD && in isConstNotMutableType()
1728 static bool rejectConstNotMutableType(Sema &SemaRef, const ValueDecl *D, in rejectConstNotMutableType() argument
1733 ASTContext &Context = SemaRef.getASTContext(); in rejectConstNotMutableType()
1735 if (isConstNotMutableType(SemaRef, Type, AcceptIfMutable, &IsClassType)) { in rejectConstNotMutableType()
1739 SemaRef.Diag(ELoc, Diag) << getOpenMPClauseName(CKind); in rejectConstNotMutableType()
1744 SemaRef.Diag(D->getLocation(), in rejectConstNotMutableType()
1768 SemaRef, VD, D->getType().getNonReferenceType(), in getTopDSA()
1779 SemaRef.getLangOpts().OpenMPUseTLS && in getTopDSA()
1780 SemaRef.getASTContext().getTargetInfo().isTLSSupported())) || in getTopDSA()
1784 SemaRef, VD, D->getType().getNonReferenceType(), D->getLocation()); in getTopDSA()
1789 if (SemaRef.getLangOpts().OpenMPCUDAMode && VD && in getTopDSA()
1801 buildDeclRefExpr(SemaRef, VD, D->getType().getNonReferenceType(), in getTopDSA()
1816 if (!SemaRef.OpenMP().isOpenMPCapturedByRef( in getTopDSA()
1820 buildDeclRefExpr(SemaRef, VD, D->getType().getNonReferenceType(), in getTopDSA()
1868 if (SemaRef.LangOpts.OpenMP <= 31) { in getTopDSA()
1873 if (isConstNotMutableType(SemaRef, D->getType())) { in getTopDSA()
2027 VarDataSharingAttributesStack = new DSAStackTy(SemaRef); in InitDataSharingAttributesStack()
2061 Sema::FunctionEmissionStatus FES = SemaRef.getEmissionStatus(FD); in diagIfOpenMPDeviceCode()
2074 Kind = isOpenMPDeviceDelayedContext(SemaRef) in diagIfOpenMPDeviceCode()
2088 return SemaDiagnosticBuilder(Kind, Loc, DiagID, FD, SemaRef); in diagIfOpenMPDeviceCode()
2099 Sema::FunctionEmissionStatus FES = SemaRef.getEmissionStatus(FD); in diagIfOpenMPHostCode()
2115 return SemaDiagnosticBuilder(Kind, Loc, DiagID, FD, SemaRef); in diagIfOpenMPHostCode()
2376 (SemaRef.getCurCapturedRegion() || SemaRef.getCurBlock() || in isOpenMPCapturedDecl()
2377 SemaRef.getCurLambda())) { in isOpenMPCapturedDecl()
2390 llvm::reverse(SemaRef.FunctionScopes), in isOpenMPCapturedDecl()
2391 CheckScopeInfo ? (SemaRef.FunctionScopes.size() - (StopAt + 1)) in isOpenMPCapturedDecl()
2421 FunctionScopeInfo *FSI = SemaRef.FunctionScopes[I - 1]; in isOpenMPCapturedDecl()
2486 if (SemaRef.getCurrentThisType().isNull()) in isOpenMPCapturedDecl()
2488 Expr *ThisExpr = SemaRef.BuildCXXThisExpr(SourceLocation(), in isOpenMPCapturedDecl()
2489 SemaRef.getCurrentThisType(), in isOpenMPCapturedDecl()
2492 Expr *ME = SemaRef.BuildMemberExpr( in isOpenMPCapturedDecl()
2499 SemaRef, FD->getIdentifier(), ME, DVarPrivate.CKind != OMPC_private, in isOpenMPCapturedDecl()
2500 SemaRef.CurContext->getParent(), /*AsExpression=*/false); in isOpenMPCapturedDecl()
2502 SemaRef, CD, CD->getType().getNonReferenceType(), SourceLocation()); in isOpenMPCapturedDecl()
2791 SemaRef.PushExpressionEvaluationContext( in StartOpenMPDSABlock()
2801 SemaRef.CleanupVarDeclMarking(); in EndOpenMPClause()
2880 static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack,
2912 SemaRef, DE->getExprLoc(), Type.getUnqualifiedType(), in EndOpenMPDSABlock()
2914 SemaRef.ActOnUninitializedDecl(VDPrivate); in EndOpenMPDSABlock()
2920 SemaRef, VDPrivate, DE->getType(), DE->getExprLoc())); in EndOpenMPDSABlock()
2938 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in EndOpenMPDSABlock()
2991 reportOriginalDsa(SemaRef, DSAStack, VD, DVar); in EndOpenMPDSABlock()
3001 if (!SemaRef.CurContext->isDependentContext()) in EndOpenMPDSABlock()
3002 checkAllocateClauses(SemaRef, DSAStack, D->clauses()); in EndOpenMPDSABlock()
3003 checkReductionClauses(SemaRef, DSAStack, D->clauses()); in EndOpenMPDSABlock()
3007 SemaRef.DiscardCleanupsInEvaluationContext(); in EndOpenMPDSABlock()
3008 SemaRef.PopExpressionEvaluationContext(); in EndOpenMPDSABlock()
3012 Expr *NumIterations, Sema &SemaRef,
3015 static bool finishLinearClauses(Sema &SemaRef, ArrayRef<OMPClause *> Clauses, in finishLinearClauses() argument
3018 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in finishLinearClauses()
3021 if (SemaRef.CurContext->isDependentContext()) in finishLinearClauses()
3030 B.NumIterations, SemaRef, in finishLinearClauses()
3031 SemaRef.getCurScope(), Stack)) in finishLinearClauses()
3042 Sema &SemaRef; member in __anon1dd12e441e11::VarDeclFilterCCC
3045 explicit VarDeclFilterCCC(Sema &S) : SemaRef(S) {} in VarDeclFilterCCC()
3050 SemaRef.isDeclInScope(ND, SemaRef.getCurLexicalContext(), in ValidateCandidate()
3051 SemaRef.getCurScope()); in ValidateCandidate()
3063 Sema &SemaRef; member in __anon1dd12e441e11::VarOrFuncDeclFilterCCC
3066 explicit VarOrFuncDeclFilterCCC(Sema &S) : SemaRef(S) {} in VarOrFuncDeclFilterCCC()
3071 return SemaRef.isDeclInScope(ND, SemaRef.getCurLexicalContext(), in ValidateCandidate()
3072 SemaRef.getCurScope()); in ValidateCandidate()
3089 LookupResult Lookup(SemaRef, Id, Sema::LookupOrdinaryName); in ActOnOpenMPIdExpression()
3090 SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, in ActOnOpenMPIdExpression()
3099 VarDeclFilterCCC CCC(SemaRef); in ActOnOpenMPIdExpression()
3101 SemaRef.CorrectTypo(Id, Sema::LookupOrdinaryName, CurScope, nullptr, in ActOnOpenMPIdExpression()
3103 SemaRef.diagnoseTypo(Corrected, in ActOnOpenMPIdExpression()
3141 !SemaRef.getCurLexicalContext()->isTranslationUnit()) { in ActOnOpenMPIdExpression()
3156 !CanonicalVD->getDeclContext()->Equals(SemaRef.getCurLexicalContext())) { in ActOnOpenMPIdExpression()
3171 (!SemaRef.getCurLexicalContext()->isFileContext() || in ActOnOpenMPIdExpression()
3172 !SemaRef.getCurLexicalContext()->Encloses( in ActOnOpenMPIdExpression()
3187 !SemaRef.isDeclInScope(ND, SemaRef.getCurLexicalContext(), CurScope)) { in ActOnOpenMPIdExpression()
3219 SemaRef.CurContext->addDecl(D); in ActOnOpenMPThreadprivateDirective()
3228 Sema &SemaRef; member in __anon1dd12e441f11::LocalVarRefChecker
3234 SemaRef.Diag(E->getBeginLoc(), in VisitDeclRefExpr()
3237 SemaRef.Diag(VD->getLocation(), diag::note_defined_here) in VisitDeclRefExpr()
3251 explicit LocalVarRefChecker(Sema &SemaRef) : SemaRef(SemaRef) {} in LocalVarRefChecker() argument
3278 if (SemaRef.RequireCompleteType( in CheckOMPThreadPrivateDecl()
3317 LocalVarRefChecker Checker(SemaRef); in CheckOMPThreadPrivateDecl()
3331 D = OMPThreadPrivateDecl::Create(Context, SemaRef.getCurLexicalContext(), in CheckOMPThreadPrivateDecl()
3451 SemaRef.targetDiag(Loc, diag::err_expected_allocator_clause); in ActOnOpenMPAllocateDirective()
3462 getAllocatorKind(SemaRef, DSAStack, Allocator); in ActOnOpenMPAllocateDirective()
3477 if (checkPreviousOMPAllocateAttribute(SemaRef, DSAStack, RefExpr, VD, in ActOnOpenMPAllocateDirective()
3500 applyOMPAllocateAttribute(SemaRef, VD, AllocatorKind, Allocator, Alignment, in ActOnOpenMPAllocateDirective()
3506 Owner = SemaRef.getCurLexicalContext(); in ActOnOpenMPAllocateDirective()
3517 if (!SemaRef.CurContext->isFileContext()) { in ActOnOpenMPRequiresDirective()
3522 SemaRef.CurContext->addDecl(D); in ActOnOpenMPRequiresDirective()
3558 auto *Ctx = SemaRef.CurContext; in ActOnOpenMPAssumesDirective()
3621 getASTContext(), SemaRef.getCurLexicalContext(), Loc, ClauseList); in CheckOMPRequiresDecl()
3625 static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack, in reportOriginalDsa() argument
3630 SemaRef.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_explicit_dsa) in reportOriginalDsa()
3666 else if (D->getType().isConstant(SemaRef.getASTContext())) in reportOriginalDsa()
3673 SemaRef.Diag(ReportLoc, diag::note_omp_predetermined_dsa) in reportOriginalDsa()
3677 SemaRef.Diag(DVar.ImplicitDSALoc, diag::note_omp_implicit_dsa) in reportOriginalDsa()
3729 Sema &SemaRef; member in __anon1dd12e442111::DSAAttrChecker
3863 getVariableCategoryFromDecl(SemaRef.getLangOpts(), VD); in VisitDeclRefExpr()
3864 if (SemaRef.getLangOpts().OpenMP >= 50) { in VisitDeclRefExpr()
3886 if (SemaRef.getLangOpts().OpenMP > 50) { in VisitDeclRefExpr()
3905 if (SemaRef.LangOpts.OpenMP >= 50) in VisitDeclRefExpr()
3960 SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task); in VisitDeclRefExpr()
3961 reportOriginalDsa(SemaRef, Stack, VD, DVar); in VisitDeclRefExpr()
4032 getVariableCategoryFromDecl(SemaRef.getLangOpts(), FD); in VisitMemberExpr()
4056 SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task); in VisitMemberExpr()
4057 reportOriginalDsa(SemaRef, Stack, FD, DVar); in VisitMemberExpr()
4076 if (!checkMapClauseExpressionBase(SemaRef, E, CurComponents, OMPC_map, in VisitMemberExpr()
4188 SemaRef, VD, VD->getType().getNonLValueExprType(SemaRef.Context), in visitSubCaptures()
4210 DSAAttrChecker(DSAStackTy *S, Sema &SemaRef, CapturedStmt *CS) in DSAAttrChecker() argument
4211 : Stack(S), SemaRef(SemaRef), ErrorFound(false), CS(CS) { in DSAAttrChecker()
4239 getParallelRegionParams(Sema &SemaRef, bool LoopBoundSharing) { in getParallelRegionParams() argument
4240 ASTContext &Context = SemaRef.getASTContext(); in getParallelRegionParams()
4261 getTeamsRegionParams(Sema &SemaRef) { in getTeamsRegionParams() argument
4262 return getParallelRegionParams(SemaRef, /*LoopBoundSharing=*/false); in getTeamsRegionParams()
4266 getTaskRegionParams(Sema &SemaRef) { in getTaskRegionParams() argument
4267 ASTContext &Context = SemaRef.getASTContext(); in getTaskRegionParams()
4290 getTargetRegionParams(Sema &SemaRef) { in getTargetRegionParams() argument
4291 ASTContext &Context = SemaRef.getASTContext(); in getTargetRegionParams()
4293 if (SemaRef.getLangOpts().OpenMPIsTargetDevice) { in getTargetRegionParams()
4303 getUnknownRegionParams(Sema &SemaRef) { in getUnknownRegionParams() argument
4311 getTaskloopRegionParams(Sema &SemaRef) { in getTaskloopRegionParams() argument
4312 ASTContext &Context = SemaRef.getASTContext(); in getTaskloopRegionParams()
4344 static void processCapturedRegions(Sema &SemaRef, OpenMPDirectiveKind DKind, in processCapturedRegions() argument
4353 SemaRef.getASTContext(), {}, AlwaysInlineAttr::Keyword_forceinline)); in processCapturedRegions()
4361 SemaRef.ActOnCapturedRegionStart( in processCapturedRegions()
4363 getParallelRegionParams(SemaRef, LoopBoundSharing), Level); in processCapturedRegions()
4366 SemaRef.ActOnCapturedRegionStart(Loc, CurScope, CR_OpenMP, in processCapturedRegions()
4367 getTeamsRegionParams(SemaRef), Level); in processCapturedRegions()
4370 SemaRef.ActOnCapturedRegionStart(Loc, CurScope, CR_OpenMP, in processCapturedRegions()
4371 getTaskRegionParams(SemaRef), Level); in processCapturedRegions()
4374 MarkAsInlined(SemaRef.getCurCapturedRegion()); in processCapturedRegions()
4377 SemaRef.ActOnCapturedRegionStart(Loc, CurScope, CR_OpenMP, in processCapturedRegions()
4378 getTaskloopRegionParams(SemaRef), Level); in processCapturedRegions()
4381 MarkAsInlined(SemaRef.getCurCapturedRegion()); in processCapturedRegions()
4384 SemaRef.ActOnCapturedRegionStart(Loc, CurScope, CR_OpenMP, in processCapturedRegions()
4385 getTargetRegionParams(SemaRef), Level); in processCapturedRegions()
4388 SemaRef.ActOnCapturedRegionStart(Loc, CurScope, CR_OpenMP, in processCapturedRegions()
4389 getUnknownRegionParams(SemaRef)); in processCapturedRegions()
4413 processCapturedRegions(SemaRef, DKind, CurScope, in ActOnOpenMPRegionStart()
4418 DSAStack->setContext(SemaRef.CurContext); in ActOnOpenMPRegionStart()
4529 if (!SemaRef.CurContext->isDependentContext() && in tryCaptureOpenMPLambdas()
4549 if (!VDC->Encloses(SemaRef.CurContext)) in tryCaptureOpenMPLambdas()
4551 SemaRef.MarkVariableReferenced(LC.getLocation(), VD); in tryCaptureOpenMPLambdas()
4553 QualType ThisTy = SemaRef.getCurrentThisType(); in tryCaptureOpenMPLambdas()
4556 SemaRef.CheckCXXThisCapture(LC.getLocation()); in tryCaptureOpenMPLambdas()
4605 SemaRef, ErrorFound, DSAStack->getCurrentDirective()); in ActOnOpenMPRegionEnd()
4628 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4639 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4649 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4661 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4683 if (checkOrderedOrderSpecified(SemaRef, Clauses)) in ActOnOpenMPRegionEnd()
4720 SemaRef.MarkVariableReferenced(D->getLocation(), in ActOnOpenMPRegionEnd()
4735 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4750 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4754 SemaRef.MarkDeclarationsReferencedInExpr(E); in ActOnOpenMPRegionEnd()
4760 SR = SemaRef.ActOnCapturedRegionEnd(SR.get()); in ActOnOpenMPRegionEnd()
4765 static bool checkCancelRegion(Sema &SemaRef, OpenMPDirectiveKind CurrentRegion, in checkCancelRegion() argument
4776 SemaRef.Diag(StartLoc, diag::err_omp_wrong_cancel_region) in checkCancelRegion()
4781 static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, in checkNestingOfRegions() argument
4809 if (SemaRef.LangOpts.OpenMP >= 51 && Stack->isParentOrderConcurrent() && in checkNestingOfRegions()
4813 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_order) in checkNestingOfRegions()
4818 ((SemaRef.LangOpts.OpenMP <= 45 && CurrentRegion != OMPD_ordered) || in checkNestingOfRegions()
4819 (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion != OMPD_ordered && in checkNestingOfRegions()
4834 SemaRef.Diag(StartLoc, (CurrentRegion != OMPD_simd) in checkNestingOfRegions()
4837 << (SemaRef.LangOpts.OpenMP >= 50 ? 1 : 0); in checkNestingOfRegions()
4843 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_atomic); in checkNestingOfRegions()
4852 SemaRef.Diag(StartLoc, diag::err_omp_orphaned_section_directive) in checkNestingOfRegions()
4869 if (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion == OMPD_loop && in checkNestingOfRegions()
4874 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region) in checkNestingOfRegions()
4895 (SemaRef.getLangOpts().OpenMP < 50 || in checkNestingOfRegions()
4929 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_critical_same_name) in checkNestingOfRegions()
4932 SemaRef.Diag(PreviousCriticalLoc, in checkNestingOfRegions()
4982 (SemaRef.LangOpts.OpenMP <= 45 && EnclosingConstruct != OMPD_target) || in checkNestingOfRegions()
4983 (SemaRef.LangOpts.OpenMP >= 50 && EnclosingConstruct != OMPD_unknown && in checkNestingOfRegions()
4988 if (SemaRef.LangOpts.OpenMP >= 50) { in checkNestingOfRegions()
5016 !(SemaRef.getLangOpts().OpenMPExtensions && in checkNestingOfRegions()
5057 SemaRef.Diag(StartLoc, diag::err_omp_orphaned_device_directive) in checkNestingOfRegions()
5060 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region) in checkNestingOfRegions()
5721 SemaRef.BuildUnaryOp(nullptr, {}, UO_Minus, IncBin->getRHS())); in ActOnOpenMPCanonicalLoop()
5739 SemaRef.BuildUnaryOp(nullptr, {}, UO_Minus, CondCXXOp->getArg(1))); in ActOnOpenMPCanonicalLoop()
5748 buildDistanceFunc(SemaRef, LogicalTy, CondRel, LHS, RHS, Step); in ActOnOpenMPCanonicalLoop()
5750 SemaRef, LVTy, LogicalTy, CounterRef, Step, isa<CXXForRangeStmt>(AStmt)); in ActOnOpenMPCanonicalLoop()
5752 SemaRef.BuildDeclRefExpr(LUVDecl, LUVDecl->getType(), VK_LValue, {}, in ActOnOpenMPCanonicalLoop()
5771 static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
5916 Sema &SemaRef; member in __anon1dd12e443711::TeamsLoopChecker
5948 IsOpenMPAPI || SemaRef.getLangOpts().OpenMPNoNestedParallelism; in VisitCallExpr()
5970 explicit TeamsLoopChecker(Sema &SemaRef) in TeamsLoopChecker() argument
5971 : SemaRef(SemaRef), TeamsLoopCanBeParallelFor(true) {} in TeamsLoopChecker()
5978 static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { in teamsLoopCanBeParallelFor() argument
5979 TeamsLoopChecker Checker(SemaRef); in teamsLoopCanBeParallelFor()
6103 if (checkCancelRegion(SemaRef, Kind, CancelRegion, StartLoc) || in ActOnOpenMPExecutableDirective()
6104 checkNestingOfRegions(SemaRef, DSAStack, DK, DirName, CancelRegion, in ActOnOpenMPExecutableDirective()
6123 if (AStmt && !SemaRef.CurContext->isDependentContext() && in ActOnOpenMPExecutableDirective()
6128 DSAAttrChecker DSAChecker(DSAStack, SemaRef, cast<CapturedStmt>(AStmt)); in ActOnOpenMPExecutableDirective()
6269 processImplicitMapsWithDefaultMappers(SemaRef, DSAStack, in ActOnOpenMPExecutableDirective()
6610 DSAAttrChecker DSAChecker(DSAStack, SemaRef, nullptr); in ActOnOpenMPExecutableDirective()
6752 ErrorFound = checkIfClauses(SemaRef, Kind, Clauses, AllowedNameModifiers) || in ActOnOpenMPExecutableDirective()
6758 if (!SemaRef.CurContext->isDependentContext() && in ActOnOpenMPExecutableDirective()
7006 NewStep = SemaRef in ActOnOpenMPDeclareSimdDirective()
7060 if (!SemaRef.inTemplateInstantiation()) { in ActOnFinishedFunctionDefinitionInOpenMPAssumeScope()
7087 LookupResult Lookup(SemaRef, DeclarationName(BaseII), D.getIdentifierLoc(), in ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope()
7089 SemaRef.LookupParsedName(Lookup, S, &D.getCXXScopeSpec(), in ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope()
7092 TypeSourceInfo *TInfo = SemaRef.GetTypeForDeclarator(D); in ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope()
7137 Decl *BaseD = SemaRef.HandleDeclarator(S, D, TemplateParamLists); in ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope()
7160 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated); in ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope()
7217 SemaRef.getCurFunctionDecl(), in ActOnOpenMPCall()
7263 Sema::TentativeAnalysisScope Trap(SemaRef); in ActOnOpenMPCall()
7272 NewCall = SemaRef.BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, in ActOnOpenMPCall()
7402 LookupResult Result(SemaRef, &Context.Idents.get("omp_interop_t"), in checkOpenMPDeclareVariantFunction()
7404 if (SemaRef.LookupName(Result, SemaRef.getCurScope())) { in checkOpenMPDeclareVariantFunction()
7438 Sema::TentativeAnalysisScope Trap(SemaRef); in checkOpenMPDeclareVariantFunction()
7439 ER = SemaRef.CreateBuiltinUnaryOp(VariantRef->getBeginLoc(), UO_AddrOf, in checkOpenMPDeclareVariantFunction()
7453 ImplicitConversionSequence ICS = SemaRef.TryImplicitConversion( in checkOpenMPDeclareVariantFunction()
7467 VariantRefCast = SemaRef.PerformImplicitConversion( in checkOpenMPDeclareVariantFunction()
7481 ExprResult ER = SemaRef.CheckPlaceholderExpr(VariantRefCast.get()); in checkOpenMPDeclareVariantFunction()
7523 setPrototype(SemaRef, FD, NewFD, NewType); in checkOpenMPDeclareVariantFunction()
7525 setPrototype(SemaRef, NewFD, FD, NewType); in checkOpenMPDeclareVariantFunction()
7588 if (SemaRef.areMultiversionVariantFunctionsCompatible( in checkOpenMPDeclareVariantFunction()
7674 setBranchProtectedScope(Sema &SemaRef, OpenMPDirectiveKind DKind, Stmt *AStmt) { in setBranchProtectedScope() argument
7684 for (int ThisCaptureLevel = SemaRef.OpenMP().getOpenMPCaptureLevels(DKind); in setBranchProtectedScope()
7694 SemaRef.setFunctionHasBranchProtectedScope(); in setBranchProtectedScope()
7705 setBranchProtectedScope(SemaRef, OMPD_parallel, AStmt); in ActOnOpenMPParallelDirective()
7766 Sema &SemaRef; member in __anon1dd12e443c11::OpenMPIterationSpaceChecker
7818 OpenMPIterationSpaceChecker(Sema &SemaRef, bool SupportsNonRectangular, in OpenMPIterationSpaceChecker() argument
7820 : SemaRef(SemaRef), SupportsNonRectangular(SupportsNonRectangular), in OpenMPIterationSpaceChecker()
7959 ExprResult Val = SemaRef.OpenMP().PerformOpenMPImplicitIntegerConversion( in setStep()
7977 NewStep->getIntegerConstantExpr(SemaRef.Context); in setStep()
7991 SemaRef.Diag(NewStep->getExprLoc(), in setStep()
7994 SemaRef.Diag(ConditionLoc, in setStep()
8001 SemaRef.CreateBuiltinUnaryOp(NewStep->getExprLoc(), UO_Minus, NewStep) in setStep()
8017 Sema &SemaRef; member in __anon1dd12e443c11::__anon1dd12e443d11::LoopCounterRefChecker
8027 SemaRef.Diag(E->getExprLoc(), diag::err_omp_stmt_depends_on_loop_counter) in checkDecl()
8038 VD->getNameForDiagnostic(OS, SemaRef.getPrintingPolicy(), in checkDecl()
8040 SemaRef.Diag(E->getExprLoc(), in checkDecl()
8043 SemaRef.Diag(VD->getLocation(), diag::note_previous_decl) << VD; in checkDecl()
8047 SemaRef.Diag(E->getExprLoc(), diag::err_omp_invariant_dependency); in checkDecl()
8057 DepDecl->getNameForDiagnostic(OS, SemaRef.getPrintingPolicy(), in checkDecl()
8059 SemaRef.Diag(E->getExprLoc(), in checkDecl()
8092 explicit LoopCounterRefChecker(Sema &SemaRef, DSAStackTy &Stack, in LoopCounterRefChecker() argument
8096 : SemaRef(SemaRef), Stack(Stack), CurLCDecl(CurLCDecl), in LoopCounterRefChecker()
8114 LoopCounterRefChecker LoopStmtChecker(SemaRef, Stack, LCDecl, IsInitializer, in doesDependOnLoopCounter()
8134 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_init); in checkAndSetInit()
8168 SemaRef.Diag(S->getBeginLoc(), in checkAndSetInit()
8173 buildDeclRefExpr(SemaRef, Var, in checkAndSetInit()
8199 if (dependent() || SemaRef.CurContext->isDependentContext()) in checkAndSetInit()
8202 SemaRef.Diag(S->getBeginLoc(), diag::err_omp_loop_not_canonical_init) in checkAndSetInit()
8237 bool IneqCondIsCanonical = SemaRef.getLangOpts().OpenMP >= 50; in checkAndSetCond()
8239 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_cond) in checkAndSetCond()
8283 if (dependent() || SemaRef.CurContext->isDependentContext()) in checkAndSetCond()
8285 SemaRef.Diag(CondLoc, diag::err_omp_loop_not_canonical_cond) in checkAndSetCond()
8314 if (dependent() || SemaRef.CurContext->isDependentContext()) in checkAndSetIncRHS()
8316 SemaRef.Diag(RHS->getBeginLoc(), diag::err_omp_loop_not_canonical_incr) in checkAndSetIncRHS()
8336 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_incr) << LCDecl; in checkAndSetInc()
8348 return setStep(SemaRef in checkAndSetInc()
8372 return setStep(SemaRef in checkAndSetInc()
8392 if (dependent() || SemaRef.CurContext->isDependentContext()) in checkAndSetInc()
8394 SemaRef.Diag(S->getBeginLoc(), diag::err_omp_loop_not_canonical_incr) in checkAndSetInc()
8400 tryBuildCapture(Sema &SemaRef, Expr *Capture, in tryBuildCapture() argument
8403 if (SemaRef.CurContext->isDependentContext() || Capture->containsErrors()) in tryBuildCapture()
8405 if (Capture->isEvaluatable(SemaRef.Context, Expr::SE_AllowSideEffects)) in tryBuildCapture()
8406 return SemaRef.PerformImplicitConversion( in tryBuildCapture()
8411 return buildCapture(SemaRef, Capture, I->second, Name); in tryBuildCapture()
8413 ExprResult Res = buildCapture(SemaRef, Capture, Ref, Name); in tryBuildCapture()
8421 calculateNumIters(Sema &SemaRef, Scope *S, SourceLocation DefaultLoc, in calculateNumIters() argument
8425 ExprResult NewStep = tryBuildCapture(SemaRef, Step, Captures, ".new_step"); in calculateNumIters()
8431 Lower->getIntegerConstantExpr(SemaRef.Context)) { in calculateNumIters()
8436 Step->getIntegerConstantExpr(SemaRef.Context)) { in calculateNumIters()
8475 Upper->getIntegerConstantExpr(SemaRef.Context)) { in calculateNumIters()
8498 uint64_t LowerSize = SemaRef.Context.getTypeSize(LowerTy); in calculateNumIters()
8499 uint64_t UpperSize = SemaRef.Context.getTypeSize(UpperTy); in calculateNumIters()
8502 QualType CastType = SemaRef.Context.getIntTypeForBitwidth( in calculateNumIters()
8505 SemaRef in calculateNumIters()
8507 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Upper).get(), in calculateNumIters()
8510 Lower = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Lower).get(); in calculateNumIters()
8511 NewStep = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, NewStep.get()); in calculateNumIters()
8526 SemaRef.BuildBinOp(S, DefaultLoc, BO_Sub, Diff.get(), NewStep.get()); in calculateNumIters()
8533 Diff = SemaRef.BuildBinOp( in calculateNumIters()
8535 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in calculateNumIters()
8539 Diff = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Diff.get()); in calculateNumIters()
8544 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Sub, Upper, Diff.get()); in calculateNumIters()
8548 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Sub, Upper, Lower); in calculateNumIters()
8553 SemaRef.Diag(Upper->getBeginLoc(), diag::err_omp_loop_diff_cxx) in calculateNumIters()
8563 Diff = SemaRef.BuildBinOp( in calculateNumIters()
8565 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in calculateNumIters()
8572 SemaRef.BuildBinOp(S, DefaultLoc, BO_Add, Diff.get(), NewStep.get()); in calculateNumIters()
8579 Diff = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Diff.get()); in calculateNumIters()
8584 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Div, Diff.get(), NewStep.get()); in calculateNumIters()
8597 !SemaRef.getLangOpts().CPlusPlus) in buildNumIterations()
8609 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, IS.MinValue); in buildNumIterations()
8613 ExprResult LBMinVal = SemaRef.BuildBinOp(S, DefaultLoc, BO_Assign, in buildNumIterations()
8619 SemaRef.BuildBinOp(S, DefaultLoc, BO_Comma, LBMinVal.get(), LBVal); in buildNumIterations()
8623 LBMinVal = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, LBMinVal.get()); in buildNumIterations()
8629 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, IS.MaxValue); in buildNumIterations()
8633 ExprResult LBMaxVal = SemaRef.BuildBinOp(S, DefaultLoc, BO_Assign, in buildNumIterations()
8639 SemaRef.BuildBinOp(S, DefaultLoc, BO_Comma, LBMaxVal.get(), LBVal); in buildNumIterations()
8643 LBMaxVal = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, LBMaxVal.get()); in buildNumIterations()
8648 tryBuildCapture(SemaRef, LBMinVal.get(), Captures, ".lb_min").get(); in buildNumIterations()
8650 tryBuildCapture(SemaRef, LBMaxVal.get(), Captures, ".lb_max").get(); in buildNumIterations()
8655 SemaRef.BuildBinOp(S, DefaultLoc, BO_LT, LBMin, LBMax); in buildNumIterations()
8659 tryBuildCapture(SemaRef, MinLessMaxRes.get(), Captures, ".min_less_max") in buildNumIterations()
8666 ExprResult MinLB = SemaRef.ActOnConditionalOp(DefaultLoc, DefaultLoc, in buildNumIterations()
8674 ExprResult MaxLB = SemaRef.ActOnConditionalOp(DefaultLoc, DefaultLoc, in buildNumIterations()
8682 SemaRef.BuildBinOp(S, DefaultLoc, BO_Assign, IS.CounterVar, LBVal); in buildNumIterations()
8695 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, IS.MinValue); in buildNumIterations()
8699 ExprResult UBMinVal = SemaRef.BuildBinOp(S, DefaultLoc, BO_Assign, in buildNumIterations()
8705 SemaRef.BuildBinOp(S, DefaultLoc, BO_Comma, UBMinVal.get(), UBVal); in buildNumIterations()
8709 UBMinVal = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, UBMinVal.get()); in buildNumIterations()
8715 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, IS.MaxValue); in buildNumIterations()
8719 ExprResult UBMaxVal = SemaRef.BuildBinOp(S, DefaultLoc, BO_Assign, in buildNumIterations()
8725 SemaRef.BuildBinOp(S, DefaultLoc, BO_Comma, UBMaxVal.get(), UBVal); in buildNumIterations()
8729 UBMaxVal = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, UBMaxVal.get()); in buildNumIterations()
8734 tryBuildCapture(SemaRef, UBMinVal.get(), Captures, ".ub_min").get(); in buildNumIterations()
8736 tryBuildCapture(SemaRef, UBMaxVal.get(), Captures, ".ub_max").get(); in buildNumIterations()
8741 SemaRef.BuildBinOp(S, DefaultLoc, BO_GT, UBMin, UBMax); in buildNumIterations()
8744 Expr *MinGreaterMax = tryBuildCapture(SemaRef, MinGreaterMaxRes.get(), in buildNumIterations()
8752 ExprResult MaxUB = SemaRef.ActOnConditionalOp( in buildNumIterations()
8760 ExprResult MinUB = SemaRef.ActOnConditionalOp( in buildNumIterations()
8769 Expr *Upper = tryBuildCapture(SemaRef, UBExpr, Captures, ".upper").get(); in buildNumIterations()
8770 Expr *Lower = tryBuildCapture(SemaRef, LBExpr, Captures, ".lower").get(); in buildNumIterations()
8774 ExprResult Diff = calculateNumIters(SemaRef, S, DefaultLoc, Lower, Upper, in buildNumIterations()
8782 ASTContext &C = SemaRef.Context; in buildNumIterations()
8791 if (!SemaRef.Context.hasSameType(Diff.get()->getType(), Type)) { in buildNumIterations()
8792 Diff = SemaRef.PerformImplicitConversion( in buildNumIterations()
8803 SemaRef.Diag(DefaultLoc, diag::warn_omp_loop_64_bit_var) in buildNumIterations()
8809 if (!SemaRef.Context.hasSameType(Diff.get()->getType(), NewType)) { in buildNumIterations()
8810 Diff = SemaRef.PerformImplicitConversion(Diff.get(), NewType, in buildNumIterations()
8838 LBNonRect ? LBExpr : tryBuildCapture(SemaRef, LBExpr, Captures).get(); in buildMinMaxValues()
8840 UBNonRect ? UBExpr : tryBuildCapture(SemaRef, UBExpr, Captures).get(); in buildMinMaxValues()
8852 ExprResult Diff = calculateNumIters(SemaRef, S, DefaultLoc, Lower, Upper, in buildMinMaxValues()
8860 Diff = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Diff.get()); in buildMinMaxValues()
8864 ExprResult NewStep = tryBuildCapture(SemaRef, Step, Captures, ".new_step"); in buildMinMaxValues()
8867 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Mul, Diff.get(), NewStep.get()); in buildMinMaxValues()
8872 Diff = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Diff.get()); in buildMinMaxValues()
8878 !SemaRef.Context.hasSameType( in buildMinMaxValues()
8880 SemaRef.Context.getUnsignedPointerDiffType())) { in buildMinMaxValues()
8881 Diff = SemaRef.PerformImplicitConversion( in buildMinMaxValues()
8882 Diff.get(), SemaRef.Context.getUnsignedPointerDiffType(), in buildMinMaxValues()
8891 Diff = SemaRef.BuildBinOp( in buildMinMaxValues()
8893 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Lower).get(), in buildMinMaxValues()
8900 Diff = SemaRef.BuildBinOp( in buildMinMaxValues()
8902 SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Upper).get(), in buildMinMaxValues()
8909 if (SemaRef.Context.hasSameType(Diff.get()->getType(), VarType)) in buildMinMaxValues()
8910 Diff = SemaRef.PerformImplicitConversion(Diff.get(), VarType, in buildMinMaxValues()
8916 Sema::TentativeAnalysisScope Trap(SemaRef); in buildMinMaxValues()
8917 Diff = SemaRef.ActOnFinishFullExpr(Diff.get(), /*DiscardedValue=*/false); in buildMinMaxValues()
8943 return SemaRef in buildPreCond()
8945 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get(), in buildPreCond()
8946 SemaRef.Context.BoolTy, /*Action=*/Sema::AA_Casting, in buildPreCond()
8951 Sema::TentativeAnalysisScope Trap(SemaRef); in buildPreCond()
8953 ExprResult NewLB = tryBuildCapture(SemaRef, LB, Captures); in buildPreCond()
8954 ExprResult NewUB = tryBuildCapture(SemaRef, UB, Captures); in buildPreCond()
8959 SemaRef.BuildBinOp(S, DefaultLoc, in buildPreCond()
8964 if (!SemaRef.Context.hasSameUnqualifiedType(CondExpr.get()->getType(), in buildPreCond()
8965 SemaRef.Context.BoolTy)) in buildPreCond()
8966 CondExpr = SemaRef.PerformImplicitConversion( in buildPreCond()
8967 CondExpr.get(), SemaRef.Context.BoolTy, /*Action=*/Sema::AA_Casting, in buildPreCond()
8981 VD = SemaRef.OpenMP().isOpenMPCapturedDecl(LCDecl); in buildCounterVar()
8983 SemaRef, VD, VD->getType().getNonReferenceType(), DefaultLoc); in buildCounterVar()
8999 SemaRef, DefaultLoc, Type, LCDecl->getName(), in buildPrivateCounterVar()
9002 ? buildDeclRefExpr(SemaRef, cast<VarDecl>(LCDecl), Type, DefaultLoc) in buildPrivateCounterVar()
9006 return buildDeclRefExpr(SemaRef, PrivateVar, Type, DefaultLoc); in buildPrivateCounterVar()
9021 Expr *Cnt = SemaRef.DefaultLvalueConversion(Counter).get(); in buildOrderedLoopData()
9028 Cnt = SemaRef.BuildBinOp(S, Loc, BOK, Cnt, Inc).get(); in buildOrderedLoopData()
9034 !SemaRef.getLangOpts().CPlusPlus) in buildOrderedLoopData()
9038 *TestIsLessOp ? Cnt : tryBuildCapture(SemaRef, LB, Captures).get(); in buildOrderedLoopData()
9040 *TestIsLessOp ? tryBuildCapture(SemaRef, LB, Captures).get() : Cnt; in buildOrderedLoopData()
9045 SemaRef, S, DefaultLoc, Lower, Upper, Step, VarType, in buildOrderedLoopData()
9064 OpenMPIterationSpaceChecker ISC(SemaRef, /*SupportsNonRectangular=*/true, in ActOnOpenMPLoopInitialization()
9074 PrivateRef = buildCapture(SemaRef, D, ISC.getLoopDeclRefExpr(), in ActOnOpenMPLoopInitialization()
9084 SemaRef.MarkDeclarationsReferencedInExpr(buildDeclRefExpr( in ActOnOpenMPLoopInitialization()
9085 SemaRef, const_cast<VarDecl *>(Var), in ActOnOpenMPLoopInitialization()
9123 reportOriginalDsa(SemaRef, DSAStack, D, DVar, /*IsLoopIterVar=*/true); in ActOnOpenMPLoopInitialization()
9156 OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, in checkOpenMPIterationSpace() argument
9172 if (!For && (SemaRef.LangOpts.OpenMP <= 45 || !CXXFor)) { in checkOpenMPIterationSpace()
9173 OpenMPDirectiveKind DK = (SemaRef.getLangOpts().OpenMP < 50 || in checkOpenMPIterationSpace()
9177 SemaRef.Diag(S->getBeginLoc(), diag::err_omp_not_for) in checkOpenMPIterationSpace()
9183 SemaRef.Diag(DSA.getConstructLoc(), in checkOpenMPIterationSpace()
9188 SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), in checkOpenMPIterationSpace()
9192 SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), in checkOpenMPIterationSpace()
9201 if (CXXFor && SemaRef.CurContext->isDependentContext()) in checkOpenMPIterationSpace()
9204 OpenMPIterationSpaceChecker ISC(SemaRef, SupportsNonRectangular, DSA, in checkOpenMPIterationSpace()
9224 !(SemaRef.getLangOpts().CPlusPlus && VarType->isOverloadableType())) { in checkOpenMPIterationSpace()
9225 SemaRef.Diag(Init->getBeginLoc(), diag::err_omp_loop_variable_type) in checkOpenMPIterationSpace()
9226 << SemaRef.getLangOpts().CPlusPlus; in checkOpenMPIterationSpace()
9250 if (ISC.dependent() || SemaRef.CurContext->isDependentContext() || HasErrors) in checkOpenMPIterationSpace()
9341 Expr *Cnt = SemaRef in checkOpenMPIterationSpace()
9349 SemaRef.ActOnIntegerConstant(DoacrossC->getColonLoc(), /*Val=*/1) in checkOpenMPIterationSpace()
9373 buildCounterInit(Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, in buildCounterInit() argument
9379 : tryBuildCapture(SemaRef, Start.get(), Captures); in buildCounterInit()
9382 if (!SemaRef.Context.hasSameType(NewStart.get()->getType(), in buildCounterInit()
9384 NewStart = SemaRef.PerformImplicitConversion( in buildCounterInit()
9392 SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), NewStart.get()); in buildCounterInit()
9398 Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, in buildCounterUpdate() argument
9403 Iter = SemaRef.ActOnParenExpr(Loc, Loc, Iter.get()); in buildCounterUpdate()
9410 NewStep = tryBuildCapture(SemaRef, Step.get(), *Captures); in buildCounterUpdate()
9414 SemaRef.BuildBinOp(S, Loc, BO_Mul, Iter.get(), NewStep.get()); in buildCounterUpdate()
9422 ExprResult NewStart = SemaRef.ActOnParenExpr(Loc, Loc, Start.get()); in buildCounterUpdate()
9426 NewStart = tryBuildCapture(SemaRef, Start.get(), *Captures); in buildCounterUpdate()
9436 Sema::TentativeAnalysisScope Trap(SemaRef); in buildCounterUpdate()
9439 SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), NewStart.get()); in buildCounterUpdate()
9442 SemaRef.BuildBinOp(S, Loc, Subtract ? BO_SubAssign : BO_AddAssign, in buildCounterUpdate()
9445 Update = SemaRef.CreateBuiltinBinOp(Loc, BO_Comma, Update.get(), in buildCounterUpdate()
9453 Update = SemaRef.BuildBinOp(S, Loc, Subtract ? BO_Sub : BO_Add, in buildCounterUpdate()
9458 if (!SemaRef.Context.hasSameType(Update.get()->getType(), in buildCounterUpdate()
9460 Update = SemaRef.PerformImplicitConversion( in buildCounterUpdate()
9466 Update = SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), Update.get()); in buildCounterUpdate()
9473 static ExprResult widenIterationCount(unsigned Bits, Expr *E, Sema &SemaRef) { in widenIterationCount() argument
9476 ASTContext &C = SemaRef.Context; in widenIterationCount()
9483 return SemaRef.PerformImplicitConversion(E, NewType, Sema::AA_Converting, in widenIterationCount()
9489 static bool fitsInto(unsigned Bits, bool Signed, const Expr *E, Sema &SemaRef) { in fitsInto() argument
9493 E->getIntegerConstantExpr(SemaRef.Context)) in fitsInto()
9577 Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, in checkOpenMPLoop() argument
9582 bool SupportsNonPerfectlyNested = (SemaRef.LangOpts.OpenMP >= 50) && in checkOpenMPLoop()
9589 CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) { in checkOpenMPLoop()
9602 SemaRef.getASTContext())) { in checkOpenMPLoop()
9605 SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), in checkOpenMPLoop()
9608 SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), in checkOpenMPLoop()
9626 [DKind, &SemaRef, &DSA, NumLoops, NestedLoopCount, in checkOpenMPLoop()
9630 DKind, CurStmt, SemaRef, DSA, Cnt, NestedLoopCount, in checkOpenMPLoop()
9644 [&SemaRef, &Captures](OMPLoopTransformationDirective *Transform) { in checkOpenMPLoop()
9658 SemaRef, D, D->getType().getNonReferenceType(), in checkOpenMPLoop()
9669 if (SemaRef.CurContext->isDependentContext()) in checkOpenMPLoop()
9707 SemaRef in checkOpenMPLoop()
9712 SemaRef); in checkOpenMPLoop()
9715 SemaRef in checkOpenMPLoop()
9720 SemaRef); in checkOpenMPLoop()
9725 ASTContext &C = SemaRef.Context; in checkOpenMPLoop()
9732 SemaRef.BuildBinOp(CurScope, PreCond.get()->getExprLoc(), BO_LAnd, in checkOpenMPLoop()
9739 LastIteration32 = SemaRef.BuildBinOp( in checkOpenMPLoop()
9741 SemaRef in checkOpenMPLoop()
9747 LastIteration64 = SemaRef.BuildBinOp( in checkOpenMPLoop()
9749 SemaRef in checkOpenMPLoop()
9758 if (SemaRef.getLangOpts().OpenMPOptimisticCollapse || in checkOpenMPLoop()
9765 LastIteration64.get(), SemaRef)))) in checkOpenMPLoop()
9772 SemaRef.Context.getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/0); in checkOpenMPLoop()
9774 SemaRef.Context.getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/1); in checkOpenMPLoop()
9783 LastIteration = SemaRef.BuildBinOp( in checkOpenMPLoop()
9786 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in checkOpenMPLoop()
9793 bool IsConstant = LastIteration.get()->isIntegerConstantExpr(SemaRef.Context); in checkOpenMPLoop()
9797 tryBuildCapture(SemaRef, LastIteration.get(), Captures); in checkOpenMPLoop()
9801 NumIterations = SemaRef.BuildBinOp( in checkOpenMPLoop()
9803 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in checkOpenMPLoop()
9817 VarDecl *LBDecl = buildVarDecl(SemaRef, InitLoc, VType, ".omp.lb"); in checkOpenMPLoop()
9818 LB = buildDeclRefExpr(SemaRef, LBDecl, VType, InitLoc); in checkOpenMPLoop()
9819 SemaRef.AddInitializerToDecl(LBDecl, in checkOpenMPLoop()
9820 SemaRef.ActOnIntegerConstant(InitLoc, 0).get(), in checkOpenMPLoop()
9824 VarDecl *UBDecl = buildVarDecl(SemaRef, InitLoc, VType, ".omp.ub"); in checkOpenMPLoop()
9825 UB = buildDeclRefExpr(SemaRef, UBDecl, VType, InitLoc); in checkOpenMPLoop()
9826 SemaRef.AddInitializerToDecl(UBDecl, LastIteration.get(), in checkOpenMPLoop()
9831 QualType Int32Ty = SemaRef.Context.getIntTypeForBitwidth(32, true); in checkOpenMPLoop()
9832 VarDecl *ILDecl = buildVarDecl(SemaRef, InitLoc, Int32Ty, ".omp.is_last"); in checkOpenMPLoop()
9833 IL = buildDeclRefExpr(SemaRef, ILDecl, Int32Ty, InitLoc); in checkOpenMPLoop()
9834 SemaRef.AddInitializerToDecl(ILDecl, in checkOpenMPLoop()
9835 SemaRef.ActOnIntegerConstant(InitLoc, 0).get(), in checkOpenMPLoop()
9840 buildVarDecl(SemaRef, InitLoc, StrideVType, ".omp.stride"); in checkOpenMPLoop()
9841 ST = buildDeclRefExpr(SemaRef, STDecl, StrideVType, InitLoc); in checkOpenMPLoop()
9842 SemaRef.AddInitializerToDecl(STDecl, in checkOpenMPLoop()
9843 SemaRef.ActOnIntegerConstant(InitLoc, 1).get(), in checkOpenMPLoop()
9848 ExprResult IsUBGreater = SemaRef.BuildBinOp(CurScope, InitLoc, BO_GT, in checkOpenMPLoop()
9850 ExprResult CondOp = SemaRef.ActOnConditionalOp( in checkOpenMPLoop()
9853 EUB = SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, UB.get(), in checkOpenMPLoop()
9855 EUB = SemaRef.ActOnFinishFullExpr(EUB.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
9864 buildVarDecl(SemaRef, InitLoc, VType, ".omp.comb.lb"); in checkOpenMPLoop()
9865 CombLB = buildDeclRefExpr(SemaRef, CombLBDecl, VType, InitLoc); in checkOpenMPLoop()
9866 SemaRef.AddInitializerToDecl( in checkOpenMPLoop()
9867 CombLBDecl, SemaRef.ActOnIntegerConstant(InitLoc, 0).get(), in checkOpenMPLoop()
9872 buildVarDecl(SemaRef, InitLoc, VType, ".omp.comb.ub"); in checkOpenMPLoop()
9873 CombUB = buildDeclRefExpr(SemaRef, CombUBDecl, VType, InitLoc); in checkOpenMPLoop()
9874 SemaRef.AddInitializerToDecl(CombUBDecl, LastIteration.get(), in checkOpenMPLoop()
9877 ExprResult CombIsUBGreater = SemaRef.BuildBinOp( in checkOpenMPLoop()
9880 SemaRef.ActOnConditionalOp(InitLoc, InitLoc, CombIsUBGreater.get(), in checkOpenMPLoop()
9882 CombEUB = SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, CombUB.get(), in checkOpenMPLoop()
9885 SemaRef.ActOnFinishFullExpr(CombEUB.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
9901 buildDeclRefExpr(SemaRef, PrevLBDecl, PrevLBDecl->getType(), InitLoc); in checkOpenMPLoop()
9903 buildDeclRefExpr(SemaRef, PrevUBDecl, PrevUBDecl->getType(), InitLoc); in checkOpenMPLoop()
9911 VarDecl *IVDecl = buildVarDecl(SemaRef, InitLoc, RealVType, ".omp.iv"); in checkOpenMPLoop()
9912 IV = buildDeclRefExpr(SemaRef, IVDecl, RealVType, InitLoc); in checkOpenMPLoop()
9919 : SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get(); in checkOpenMPLoop()
9920 Init = SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, IV.get(), RHS); in checkOpenMPLoop()
9921 Init = SemaRef.ActOnFinishFullExpr(Init.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
9930 : SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get(); in checkOpenMPLoop()
9932 SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, IV.get(), CombRHS); in checkOpenMPLoop()
9934 SemaRef.ActOnFinishFullExpr(CombInit.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
9949 SemaRef in checkOpenMPLoop()
9951 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()) in checkOpenMPLoop()
9954 SemaRef.ActOnFinishFullExpr(BoundUB, /*DiscardedValue*/ false).get(); in checkOpenMPLoop()
9961 ? SemaRef.BuildBinOp(CurScope, CondLoc, in checkOpenMPLoop()
9964 : SemaRef.BuildBinOp(CurScope, CondLoc, BO_LT, IV.get(), in checkOpenMPLoop()
9968 CombDistCond = SemaRef.BuildBinOp(CurScope, CondLoc, BO_LT, IV.get(), in checkOpenMPLoop()
9977 SemaRef in checkOpenMPLoop()
9980 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()) in checkOpenMPLoop()
9983 SemaRef.ActOnFinishFullExpr(BoundCombUB, /*DiscardedValue*/ false) in checkOpenMPLoop()
9987 SemaRef.BuildBinOp(CurScope, CondLoc, UseStrictCompare ? BO_LT : BO_LE, in checkOpenMPLoop()
9993 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, IV.get(), in checkOpenMPLoop()
9994 SemaRef.ActOnIntegerConstant(IncLoc, 1).get()); in checkOpenMPLoop()
9997 Inc = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, IV.get(), Inc.get()); in checkOpenMPLoop()
9998 Inc = SemaRef.ActOnFinishFullExpr(Inc.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
10012 NextLB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, LB.get(), ST.get()); in checkOpenMPLoop()
10017 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, LB.get(), NextLB.get()); in checkOpenMPLoop()
10019 SemaRef.ActOnFinishFullExpr(NextLB.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
10023 NextUB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, UB.get(), ST.get()); in checkOpenMPLoop()
10028 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, UB.get(), NextUB.get()); in checkOpenMPLoop()
10030 SemaRef.ActOnFinishFullExpr(NextUB.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
10035 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, CombLB.get(), ST.get()); in checkOpenMPLoop()
10039 CombNextLB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, CombLB.get(), in checkOpenMPLoop()
10041 CombNextLB = SemaRef.ActOnFinishFullExpr(CombNextLB.get(), in checkOpenMPLoop()
10047 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, CombUB.get(), ST.get()); in checkOpenMPLoop()
10051 CombNextUB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, CombUB.get(), in checkOpenMPLoop()
10053 CombNextUB = SemaRef.ActOnFinishFullExpr(CombNextUB.get(), in checkOpenMPLoop()
10067 DistCond = SemaRef.BuildBinOp( in checkOpenMPLoop()
10072 SemaRef.BuildBinOp(CurScope, DistIncLoc, BO_Add, IV.get(), ST.get()); in checkOpenMPLoop()
10074 DistInc = SemaRef.BuildBinOp(CurScope, DistIncLoc, BO_Assign, IV.get(), in checkOpenMPLoop()
10077 SemaRef.ActOnFinishFullExpr(DistInc.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
10084 if (!SemaRef.Context.hasSameType(UB.get()->getType(), in checkOpenMPLoop()
10086 NewPrevUB = SemaRef.BuildCStyleCastExpr( in checkOpenMPLoop()
10088 SemaRef.Context.getTrivialTypeSourceInfo(UB.get()->getType()), in checkOpenMPLoop()
10093 ExprResult IsUBGreater = SemaRef.BuildBinOp(CurScope, DistEUBLoc, BO_GT, in checkOpenMPLoop()
10095 ExprResult CondOp = SemaRef.ActOnConditionalOp( in checkOpenMPLoop()
10097 PrevEUB = SemaRef.BuildBinOp(CurScope, DistIncLoc, BO_Assign, UB.get(), in checkOpenMPLoop()
10100 SemaRef.ActOnFinishFullExpr(PrevEUB.get(), /*DiscardedValue*/ false); in checkOpenMPLoop()
10108 SemaRef in checkOpenMPLoop()
10111 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()) in checkOpenMPLoop()
10114 SemaRef.ActOnFinishFullExpr(BoundPrevUB, /*DiscardedValue*/ false) in checkOpenMPLoop()
10118 SemaRef.BuildBinOp(CurScope, CondLoc, UseStrictCompare ? BO_LT : BO_LE, in checkOpenMPLoop()
10154 ExprResult Prod = SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get(); in checkOpenMPLoop()
10156 Prod = SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Mul, Prod.get(), in checkOpenMPLoop()
10164 SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Div, Acc.get(), Prod.get()); in checkOpenMPLoop()
10177 Prod = SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Mul, Iter.get(), in checkOpenMPLoop()
10181 Acc = SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Sub, Acc.get(), Prod.get()); in checkOpenMPLoop()
10186 SemaRef, VD, IS.CounterVar->getType(), IS.CounterVar->getExprLoc(), in checkOpenMPLoop()
10189 buildCounterInit(SemaRef, CurScope, UpdLoc, CounterVar, in checkOpenMPLoop()
10196 SemaRef, CurScope, UpdLoc, CounterVar, IS.CounterInit, Iter, in checkOpenMPLoop()
10205 buildCounterUpdate(SemaRef, CurScope, UpdLoc, CounterVar, in checkOpenMPLoop()
10241 Built.CalcLastIteration = SemaRef in checkOpenMPLoop()
10347 checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_loop, DSAStack)) { in checkLastPrivateForMappedDirectives()
10368 AStmt, SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPSimdDirective()
10372 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPSimdDirective()
10375 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPSimdDirective()
10378 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPSimdDirective()
10400 AStmt, SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPForDirective()
10404 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPForDirective()
10426 getOrderedNumberExpr(Clauses), AStmt, SemaRef, *DSAStack, in ActOnOpenMPForSimdDirective()
10431 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPForSimdDirective()
10434 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPForSimdDirective()
10437 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPForSimdDirective()
10442 static bool checkSectionsDirective(Sema &SemaRef, OpenMPDirectiveKind DKind, in checkSectionsDirective() argument
10460 SemaRef.Diag(SectionStmt->getBeginLoc(), in checkSectionsDirective()
10469 SemaRef.Diag(AStmt->getBeginLoc(), diag::err_omp_sections_not_compound_stmt) in checkSectionsDirective()
10480 if (checkSectionsDirective(SemaRef, OMPD_sections, AStmt, DSAStack)) in ActOnOpenMPSectionsDirective()
10483 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPSectionsDirective()
10496 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPSectionDirective()
10527 if (!SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPDispatchDirective()
10555 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPDispatchDirective()
10595 if (checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_loop, DSAStack)) in ActOnOpenMPGenericLoopDirective()
10598 setBranchProtectedScope(SemaRef, OMPD_loop, AStmt); in ActOnOpenMPGenericLoopDirective()
10604 AStmt, SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPGenericLoopDirective()
10608 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPGenericLoopDirective()
10624 if (checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_teams_loop, DSAStack)) in ActOnOpenMPTeamsGenericLoopDirective()
10627 CapturedStmt *CS = setBranchProtectedScope(SemaRef, OMPD_teams_loop, AStmt); in ActOnOpenMPTeamsGenericLoopDirective()
10633 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPTeamsGenericLoopDirective()
10638 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTeamsGenericLoopDirective()
10656 if (checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_target_teams_loop, in ActOnOpenMPTargetTeamsGenericLoopDirective()
10661 setBranchProtectedScope(SemaRef, OMPD_target_teams_loop, AStmt); in ActOnOpenMPTargetTeamsGenericLoopDirective()
10667 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPTargetTeamsGenericLoopDirective()
10672 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTargetTeamsGenericLoopDirective()
10677 teamsLoopCanBeParallelFor(AStmt, SemaRef)); in ActOnOpenMPTargetTeamsGenericLoopDirective()
10689 if (checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_parallel_loop, in ActOnOpenMPParallelGenericLoopDirective()
10694 setBranchProtectedScope(SemaRef, OMPD_parallel_loop, AStmt); in ActOnOpenMPParallelGenericLoopDirective()
10700 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPParallelGenericLoopDirective()
10705 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPParallelGenericLoopDirective()
10721 if (checkGenericLoopLastprivate(SemaRef, Clauses, OMPD_target_parallel_loop, in ActOnOpenMPTargetParallelGenericLoopDirective()
10726 setBranchProtectedScope(SemaRef, OMPD_target_parallel_loop, AStmt); in ActOnOpenMPTargetParallelGenericLoopDirective()
10732 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPTargetParallelGenericLoopDirective()
10737 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTargetParallelGenericLoopDirective()
10753 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPSingleDirective()
10782 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMasterDirective()
10794 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMaskedDirective()
10848 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPCriticalDirective()
10863 setBranchProtectedScope(SemaRef, OMPD_parallel_for, AStmt); in ActOnOpenMPParallelForDirective()
10870 getOrderedNumberExpr(Clauses), AStmt, SemaRef, *DSAStack, in ActOnOpenMPParallelForDirective()
10875 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPParallelForDirective()
10889 setBranchProtectedScope(SemaRef, OMPD_parallel_for_simd, AStmt); in ActOnOpenMPParallelForSimdDirective()
10896 getOrderedNumberExpr(Clauses), AStmt, SemaRef, *DSAStack, in ActOnOpenMPParallelForSimdDirective()
10901 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPParallelForSimdDirective()
10904 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPParallelForSimdDirective()
10917 setBranchProtectedScope(SemaRef, OMPD_parallel_master, AStmt); in ActOnOpenMPParallelMasterDirective()
10930 setBranchProtectedScope(SemaRef, OMPD_parallel_masked, AStmt); in ActOnOpenMPParallelMaskedDirective()
10940 if (checkSectionsDirective(SemaRef, OMPD_parallel_sections, AStmt, DSAStack)) in ActOnOpenMPParallelSectionsDirective()
10943 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPParallelSectionsDirective()
10983 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPTaskDirective()
10987 setBranchProtectedScope(SemaRef, OMPD_task, AStmt); in ActOnOpenMPTaskDirective()
11061 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPTaskgroupDirective()
11268 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPOrderedDirective()
11306 Sema &SemaRef; member in __anon1dd12e444411::OpenMPAtomicUpdateChecker
11327 OpenMPAtomicUpdateChecker(Sema &SemaRef) in OpenMPAtomicUpdateChecker() argument
11328 : SemaRef(SemaRef), X(nullptr), E(nullptr), UpdateExpr(nullptr), in OpenMPAtomicUpdateChecker()
11379 X->IgnoreParenImpCasts()->Profile(XId, SemaRef.getASTContext(), in checkBinaryOperation()
11381 LHS->IgnoreParenImpCasts()->Profile(LHSId, SemaRef.getASTContext(), in checkBinaryOperation()
11383 RHS->IgnoreParenImpCasts()->Profile(RHSId, SemaRef.getASTContext(), in checkBinaryOperation()
11418 SemaRef.Diag(ErrorLoc, DiagId) << ErrorRange; in checkBinaryOperation()
11419 SemaRef.Diag(NoteLoc, NoteId) << ErrorFound << NoteRange; in checkBinaryOperation()
11422 if (SemaRef.CurContext->isDependentContext()) in checkBinaryOperation()
11466 E = SemaRef.ActOnIntegerConstant(OpLoc, /*uint64_t Val=*/1).get(); in checkStatement()
11495 SemaRef.Diag(ErrorLoc, DiagId) << ErrorRange; in checkStatement()
11496 SemaRef.Diag(NoteLoc, NoteId) << ErrorFound << NoteRange; in checkStatement()
11499 if (SemaRef.CurContext->isDependentContext()) in checkStatement()
11505 auto *OVEX = new (SemaRef.getASTContext()) in checkStatement()
11507 auto *OVEExpr = new (SemaRef.getASTContext()) in checkStatement()
11510 SemaRef.CreateBuiltinBinOp(OpLoc, Op, IsXLHSInRHSPart ? OVEX : OVEExpr, in checkStatement()
11514 Update = SemaRef.PerformImplicitConversion(Update.get(), X->getType(), in checkStatement()
12537 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAtomicDirective()
12599 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAtomicDirective()
12610 OpenMPAtomicUpdateChecker Checker(SemaRef); in ActOnOpenMPAtomicDirective()
12618 if (!SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPAtomicDirective()
12648 OpenMPAtomicUpdateChecker Checker(SemaRef); in ActOnOpenMPAtomicDirective()
12673 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAtomicDirective()
12702 OpenMPAtomicUpdateChecker Checker(SemaRef); in ActOnOpenMPAtomicDirective()
12709 if (IsUpdateExprFound && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPAtomicDirective()
12740 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPAtomicDirective()
12837 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAtomicDirective()
12842 OpenMPAtomicCompareCaptureChecker Checker(SemaRef); in ActOnOpenMPAtomicDirective()
12862 OpenMPAtomicCompareChecker Checker(SemaRef); in ActOnOpenMPAtomicDirective()
12900 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPAtomicDirective()
12914 CapturedStmt *CS = setBranchProtectedScope(SemaRef, OMPD_target, AStmt); in ActOnOpenMPTargetDirective()
12965 setBranchProtectedScope(SemaRef, OMPD_target_parallel, AStmt); in ActOnOpenMPTargetParallelDirective()
12979 setBranchProtectedScope(SemaRef, OMPD_target_parallel_for, AStmt); in ActOnOpenMPTargetParallelForDirective()
12986 getOrderedNumberExpr(Clauses), CS, SemaRef, *DSAStack, in ActOnOpenMPTargetParallelForDirective()
12991 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetParallelForDirective()
13057 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPTargetDataDirective()
13069 setBranchProtectedScope(SemaRef, OMPD_target_enter_data, AStmt); in ActOnOpenMPTargetEnterDataDirective()
13089 setBranchProtectedScope(SemaRef, OMPD_target_exit_data, AStmt); in ActOnOpenMPTargetExitDataDirective()
13109 setBranchProtectedScope(SemaRef, OMPD_target_update, AStmt); in ActOnOpenMPTargetUpdateDirective()
13136 setBranchProtectedScope(SemaRef, OMPD_teams, AStmt); in ActOnOpenMPTeamsDirective()
13214 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPTaskLoopDirective()
13219 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTaskLoopDirective()
13225 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPTaskLoopDirective()
13231 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPTaskLoopDirective()
13234 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPTaskLoopDirective()
13252 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPTaskLoopSimdDirective()
13257 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTaskLoopSimdDirective()
13263 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPTaskLoopSimdDirective()
13269 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPTaskLoopSimdDirective()
13271 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTaskLoopSimdDirective()
13274 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPTaskLoopSimdDirective()
13291 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPMasterTaskLoopDirective()
13296 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPMasterTaskLoopDirective()
13302 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPMasterTaskLoopDirective()
13308 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPMasterTaskLoopDirective()
13311 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMasterTaskLoopDirective()
13329 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPMaskedTaskLoopDirective()
13334 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPMaskedTaskLoopDirective()
13340 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPMaskedTaskLoopDirective()
13346 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPMaskedTaskLoopDirective()
13349 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMaskedTaskLoopDirective()
13367 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPMasterTaskLoopSimdDirective()
13372 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPMasterTaskLoopSimdDirective()
13378 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPMasterTaskLoopSimdDirective()
13384 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPMasterTaskLoopSimdDirective()
13386 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPMasterTaskLoopSimdDirective()
13389 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMasterTaskLoopSimdDirective()
13406 /*OrderedLoopCountExpr=*/nullptr, AStmt, SemaRef, in ActOnOpenMPMaskedTaskLoopSimdDirective()
13411 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPMaskedTaskLoopSimdDirective()
13417 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPMaskedTaskLoopSimdDirective()
13423 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPMaskedTaskLoopSimdDirective()
13425 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPMaskedTaskLoopSimdDirective()
13428 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPMaskedTaskLoopSimdDirective()
13440 setBranchProtectedScope(SemaRef, OMPD_parallel_master_taskloop, AStmt); in ActOnOpenMPParallelMasterTaskLoopDirective()
13447 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPParallelMasterTaskLoopDirective()
13452 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPParallelMasterTaskLoopDirective()
13458 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPParallelMasterTaskLoopDirective()
13464 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPParallelMasterTaskLoopDirective()
13479 setBranchProtectedScope(SemaRef, OMPD_parallel_masked_taskloop, AStmt); in ActOnOpenMPParallelMaskedTaskLoopDirective()
13486 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPParallelMaskedTaskLoopDirective()
13491 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPParallelMaskedTaskLoopDirective()
13497 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPParallelMaskedTaskLoopDirective()
13503 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPParallelMaskedTaskLoopDirective()
13518 SemaRef, OMPD_parallel_master_taskloop_simd, AStmt); in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13525 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13530 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13536 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13542 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13544 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPParallelMasterTaskLoopSimdDirective()
13558 SemaRef, OMPD_parallel_masked_taskloop_simd, AStmt); in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13565 /*OrderedLoopCountExpr=*/nullptr, CS, SemaRef, *DSAStack, in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13570 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13576 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13582 if (checkReductionClauseWithNogroup(SemaRef, Clauses)) in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13584 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPParallelMaskedTaskLoopSimdDirective()
13607 SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPDistributeDirective()
13611 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPDistributeDirective()
13614 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPDistributeDirective()
13628 setBranchProtectedScope(SemaRef, OMPD_distribute_parallel_for, AStmt); in ActOnOpenMPDistributeParallelForDirective()
13635 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPDistributeParallelForDirective()
13640 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPDistributeParallelForDirective()
13655 SemaRef, OMPD_distribute_parallel_for_simd, AStmt); in ActOnOpenMPDistributeParallelForSimdDirective()
13662 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPDistributeParallelForSimdDirective()
13667 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPDistributeParallelForSimdDirective()
13670 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPDistributeParallelForSimdDirective()
13684 setBranchProtectedScope(SemaRef, OMPD_distribute_simd, AStmt); in ActOnOpenMPDistributeSimdDirective()
13692 SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPDistributeSimdDirective()
13696 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPDistributeSimdDirective()
13699 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPDistributeSimdDirective()
13713 setBranchProtectedScope(SemaRef, OMPD_target_parallel_for_simd, AStmt); in ActOnOpenMPTargetParallelForSimdDirective()
13720 getOrderedNumberExpr(Clauses), CS, SemaRef, *DSAStack, in ActOnOpenMPTargetParallelForSimdDirective()
13725 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetParallelForSimdDirective()
13728 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTargetParallelForSimdDirective()
13741 CapturedStmt *CS = setBranchProtectedScope(SemaRef, OMPD_target_simd, AStmt); in ActOnOpenMPTargetSimdDirective()
13748 getOrderedNumberExpr(Clauses), CS, SemaRef, *DSAStack, in ActOnOpenMPTargetSimdDirective()
13753 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetSimdDirective()
13756 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTargetSimdDirective()
13770 setBranchProtectedScope(SemaRef, OMPD_teams_distribute, AStmt); in ActOnOpenMPTeamsDistributeDirective()
13778 SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPTeamsDistributeDirective()
13782 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTeamsDistributeDirective()
13798 setBranchProtectedScope(SemaRef, OMPD_teams_distribute_simd, AStmt); in ActOnOpenMPTeamsDistributeSimdDirective()
13805 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTeamsDistributeSimdDirective()
13810 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTeamsDistributeSimdDirective()
13813 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTeamsDistributeSimdDirective()
13829 SemaRef, OMPD_teams_distribute_parallel_for_simd, AStmt); in ActOnOpenMPTeamsDistributeParallelForSimdDirective()
13836 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTeamsDistributeParallelForSimdDirective()
13841 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTeamsDistributeParallelForSimdDirective()
13844 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTeamsDistributeParallelForSimdDirective()
13860 SemaRef, OMPD_teams_distribute_parallel_for, AStmt); in ActOnOpenMPTeamsDistributeParallelForDirective()
13867 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTeamsDistributeParallelForDirective()
13873 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTeamsDistributeParallelForDirective()
13889 setBranchProtectedScope(SemaRef, OMPD_target_teams, AStmt); in ActOnOpenMPTargetTeamsDirective()
13915 setBranchProtectedScope(SemaRef, OMPD_target_teams_distribute, AStmt); in ActOnOpenMPTargetTeamsDistributeDirective()
13922 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTargetTeamsDistributeDirective()
13927 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in ActOnOpenMPTargetTeamsDistributeDirective()
13941 SemaRef, OMPD_target_teams_distribute_parallel_for, AStmt); in ActOnOpenMPTargetTeamsDistributeParallelForDirective()
13948 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTargetTeamsDistributeParallelForDirective()
13953 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetTeamsDistributeParallelForDirective()
13968 SemaRef, OMPD_target_teams_distribute_parallel_for_simd, AStmt); in ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()
13977 SemaRef, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()
13981 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()
13984 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()
13998 SemaRef, OMPD_target_teams_distribute_simd, AStmt); in ActOnOpenMPTargetTeamsDistributeSimdDirective()
14005 nullptr /*ordered not a clause on distribute*/, CS, SemaRef, *DSAStack, in ActOnOpenMPTargetTeamsDistributeSimdDirective()
14010 if (finishLinearClauses(SemaRef, Clauses, B, DSAStack)) in ActOnOpenMPTargetTeamsDistributeSimdDirective()
14013 if (checkSimdlenSafelenSpecified(SemaRef, Clauses)) in ActOnOpenMPTargetTeamsDistributeSimdDirective()
14031 checkOpenMPLoop(Kind, nullptr, nullptr, CurStmt, SemaRef, *DSAStack, in checkTransformableLoopNest()
14130 Scope *CurScope = SemaRef.getCurScope(); in ActOnOpenMPTileDirective()
14152 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPTileDirective()
14168 CaptureVars CopyTransformer(SemaRef); in ActOnOpenMPTileDirective()
14190 buildVarDecl(SemaRef, {}, CntTy, FloorCntName, nullptr, OrigCntVar); in ActOnOpenMPTileDirective()
14204 &SemaRef.PP.getIdentifierTable().get(TileCntName)); in ActOnOpenMPTileDirective()
14215 auto MakeDimTileSize = [&SemaRef = this->SemaRef, &CopyTransformer, &Context, in ActOnOpenMPTileDirective()
14243 Expr *Cond = AssertSuccess(SemaRef.BuildBinOp( in ActOnOpenMPTileDirective()
14264 auto MakeTileIVRef = [&SemaRef = this->SemaRef, &TileIndVars, I, IVTy, in ActOnOpenMPTileDirective()
14266 return buildDeclRefExpr(SemaRef, TileIndVars[I], IVTy, in ActOnOpenMPTileDirective()
14269 auto MakeFloorIVRef = [&SemaRef = this->SemaRef, &FloorIndVars, I, IVTy, in ActOnOpenMPTileDirective()
14271 return buildDeclRefExpr(SemaRef, FloorIndVars[I], IVTy, in ActOnOpenMPTileDirective()
14276 SemaRef.AddInitializerToDecl( in ActOnOpenMPTileDirective()
14277 TileIndVars[I], SemaRef.DefaultLvalueConversion(MakeFloorIVRef()).get(), in ActOnOpenMPTileDirective()
14289 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_Add, in ActOnOpenMPTileDirective()
14294 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPTileDirective()
14298 ExprResult MinTileAndIterSpace = SemaRef.ActOnConditionalOp( in ActOnOpenMPTileDirective()
14304 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPTileDirective()
14310 ExprResult IncrStmt = SemaRef.BuildUnaryOp( in ActOnOpenMPTileDirective()
14354 auto MakeFloorIVRef = [&SemaRef = this->SemaRef, &FloorIndVars, I, IVTy, in ActOnOpenMPTileDirective()
14356 return buildDeclRefExpr(SemaRef, FloorIndVars[I], IVTy, in ActOnOpenMPTileDirective()
14361 SemaRef.AddInitializerToDecl( in ActOnOpenMPTileDirective()
14363 SemaRef.ActOnIntegerConstant(LoopHelper.Init->getExprLoc(), 0).get(), in ActOnOpenMPTileDirective()
14374 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPTileDirective()
14381 SemaRef.BuildBinOp(CurScope, LoopHelper.Inc->getExprLoc(), BO_AddAssign, in ActOnOpenMPTileDirective()
14402 Scope *CurScope = SemaRef.getCurScope(); in ActOnOpenMPUnrollDirective()
14407 if (checkMutuallyExclusiveClauses(SemaRef, Clauses, in ActOnOpenMPUnrollDirective()
14430 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPUnrollDirective()
14546 buildVarDecl(SemaRef, {}, IVTy, OuterIVName, nullptr, OrigVar); in ActOnOpenMPUnrollDirective()
14548 return buildDeclRefExpr(SemaRef, OuterIVDecl, IVTy, OrigVarLoc); in ActOnOpenMPUnrollDirective()
14554 InnerIVDecl->setDeclName(&SemaRef.PP.getIdentifierTable().get(InnerIVName)); in ActOnOpenMPUnrollDirective()
14556 return buildDeclRefExpr(SemaRef, InnerIVDecl, IVTy, OrigVarLoc); in ActOnOpenMPUnrollDirective()
14561 CaptureVars CopyTransformer(SemaRef); in ActOnOpenMPUnrollDirective()
14568 ExprResult LValueConv = SemaRef.DefaultLvalueConversion(MakeOuterRef()); in ActOnOpenMPUnrollDirective()
14569 SemaRef.AddInitializerToDecl(InnerIVDecl, LValueConv.get(), in ActOnOpenMPUnrollDirective()
14584 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_Add, in ActOnOpenMPUnrollDirective()
14589 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPUnrollDirective()
14594 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPUnrollDirective()
14599 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LAnd, in ActOnOpenMPUnrollDirective()
14605 ExprResult InnerIncr = SemaRef.BuildUnaryOp( in ActOnOpenMPUnrollDirective()
14643 SemaRef.AddInitializerToDecl( in ActOnOpenMPUnrollDirective()
14645 SemaRef.ActOnIntegerConstant(LoopHelper.Init->getExprLoc(), 0).get(), in ActOnOpenMPUnrollDirective()
14654 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPUnrollDirective()
14661 SemaRef.BuildBinOp(CurScope, LoopHelper.Inc->getExprLoc(), BO_AddAssign, in ActOnOpenMPUnrollDirective()
14681 Scope *CurScope = SemaRef.getCurScope(); in ActOnOpenMPReverseDirective()
14698 if (SemaRef.CurContext->isDependentContext()) in ActOnOpenMPReverseDirective()
14769 CaptureVars CopyTransformer(SemaRef); in ActOnOpenMPReverseDirective()
14777 buildVarDecl(SemaRef, {}, IVTy, ForwardIVName, nullptr, OrigVar); in ActOnOpenMPReverseDirective()
14778 auto MakeForwardRef = [&SemaRef = this->SemaRef, ForwardIVDecl, IVTy, in ActOnOpenMPReverseDirective()
14780 return buildDeclRefExpr(SemaRef, ForwardIVDecl, IVTy, OrigVarLoc); in ActOnOpenMPReverseDirective()
14787 &SemaRef.PP.getIdentifierTable().get(ReversedIVName)); in ActOnOpenMPReverseDirective()
14795 SemaRef.AddInitializerToDecl(ForwardIVDecl, Zero, /*DirectInit=*/false); in ActOnOpenMPReverseDirective()
14806 SemaRef.BuildBinOp(CurScope, LoopHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPReverseDirective()
14815 ExprResult Incr = SemaRef.BuildUnaryOp(CurScope, LoopHelper.Inc->getExprLoc(), in ActOnOpenMPReverseDirective()
14826 ExprResult Minus = SemaRef.BuildBinOp(CurScope, TransformLoc, BO_Sub, in ActOnOpenMPReverseDirective()
14830 Minus = SemaRef.BuildBinOp(CurScope, TransformLoc, BO_Sub, Minus.get(), in ActOnOpenMPReverseDirective()
14838 SemaRef.AddInitializerToDecl(ReversedIVDecl, Minus.get(), in ActOnOpenMPReverseDirective()
14868 DeclContext *CurContext = SemaRef.CurContext; in ActOnOpenMPInterchangeDirective()
14869 Scope *CurScope = SemaRef.getCurScope(); in ActOnOpenMPInterchangeDirective()
14920 CaptureVars CopyTransformer(SemaRef); in ActOnOpenMPInterchangeDirective()
14958 &SemaRef.PP.getIdentifierTable().get(PermutedCntName)); in ActOnOpenMPInterchangeDirective()
14961 return buildDeclRefExpr(SemaRef, PermutedCntDecl, IVTy, OrigVarLoc); in ActOnOpenMPInterchangeDirective()
14968 ExprResult Zero = SemaRef.ActOnIntegerConstant(OrigVarLoc, 0); in ActOnOpenMPInterchangeDirective()
14971 SemaRef.AddInitializerToDecl(PermutedCntDecl, Zero.get(), in ActOnOpenMPInterchangeDirective()
14984 SemaRef.BuildBinOp(CurScope, SourceHelper.Cond->getExprLoc(), BO_LT, in ActOnOpenMPInterchangeDirective()
14993 ExprResult IncrStmt = SemaRef.BuildUnaryOp( in ActOnOpenMPInterchangeDirective()
15286 ExprResult Val = SemaRef.CheckBooleanCondition(StartLoc, Condition); in ActOnOpenMPIfClause()
15296 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPIfClause()
15297 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPIfClause()
15299 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPIfClause()
15319 ExprResult Val = SemaRef.CheckBooleanCondition(StartLoc, Condition); in ActOnOpenMPFinalClause()
15323 ValExpr = SemaRef.MakeFullExpr(Val.get()).get(); in ActOnOpenMPFinalClause()
15329 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPFinalClause()
15330 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPFinalClause()
15332 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPFinalClause()
15383 return SemaRef.PerformContextualImplicitConversion(Loc, Op, ConvertDiagnoser); in PerformOpenMPImplicitIntegerConversion()
15387 isNonNegativeIntegerValue(Expr *&ValExpr, Sema &SemaRef, OpenMPClauseKind CKind, in isNonNegativeIntegerValue() argument
15396 SemaRef.OpenMP().PerformOpenMPImplicitIntegerConversion(Loc, ValExpr); in isNonNegativeIntegerValue()
15403 ValExpr->getIntegerConstantExpr(SemaRef.Context)) { in isNonNegativeIntegerValue()
15407 SemaRef.Diag(Loc, diag::err_omp_negative_expression_in_clause) in isNonNegativeIntegerValue()
15416 getOpenMPCaptureRegionForClause(DKind, CKind, SemaRef.LangOpts.OpenMP); in isNonNegativeIntegerValue()
15418 !SemaRef.CurContext->isDependentContext()) { in isNonNegativeIntegerValue()
15419 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in isNonNegativeIntegerValue()
15421 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in isNonNegativeIntegerValue()
15422 *HelperValStmt = buildPreInits(SemaRef.Context, Captures); in isNonNegativeIntegerValue()
15437 if (!isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_num_threads, in ActOnOpenMPNumThreadsClause()
15445 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPNumThreadsClause()
15446 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPNumThreadsClause()
15448 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPNumThreadsClause()
15477 ICE = SemaRef.VerifyIntegerConstantExpression(E, &Result, Diagnoser, in VerifyPositiveIntegerConstantInClause()
15480 ICE = SemaRef.VerifyIntegerConstantExpression(E, &Result, in VerifyPositiveIntegerConstantInClause()
15595 if (!findOMPAllocatorHandleT(SemaRef, A->getExprLoc(), DSAStack)) in ActOnOpenMPAllocatorClause()
15598 ExprResult Allocator = SemaRef.DefaultLvalueConversion(A); in ActOnOpenMPAllocatorClause()
15601 Allocator = SemaRef.PerformImplicitConversion( in ActOnOpenMPAllocatorClause()
15990 bool IsValid = isNonNegativeIntegerValue(SizeExpr, SemaRef, OMPC_sizes, in ActOnOpenMPSizesClause()
16239 if (checkScheduleModifiers(SemaRef, M1, M2, M1Loc, M2Loc) || in ActOnOpenMPScheduleClause()
16240 checkScheduleModifiers(SemaRef, M2, M1, M2Loc, M1Loc)) in ActOnOpenMPScheduleClause()
16309 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPScheduleClause()
16310 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPScheduleClause()
16312 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPScheduleClause()
16660 DeclResult = getPrivateItem(SemaRef, E, ELoc, ERange); in ActOnOpenMPInteropDirective()
16663 DeclResult = getPrivateItem(SemaRef, E, ELoc, ERange); in ActOnOpenMPInteropDirective()
16666 DeclResult = getPrivateItem(SemaRef, E, ELoc, ERange); in ActOnOpenMPInteropDirective()
16682 static bool isValidInteropVariable(Sema &SemaRef, Expr *InteropVarExpr, in isValidInteropVariable() argument
16689 getPrivateItem(SemaRef, RefExpr, ELoc, ERange, in isValidInteropVariable()
16703 LookupResult Result(SemaRef, &SemaRef.Context.Idents.get("omp_interop_t"), in isValidInteropVariable()
16705 if (SemaRef.LookupName(Result, SemaRef.getCurScope())) { in isValidInteropVariable()
16717 SemaRef.Diag(VarLoc, diag::err_omp_implied_type_not_found) in isValidInteropVariable()
16723 if (!SemaRef.Context.hasSameType(InteropType, VarType)) { in isValidInteropVariable()
16724 SemaRef.Diag(VarLoc, diag::err_omp_interop_variable_wrong_type); in isValidInteropVariable()
16731 isConstNotMutableType(SemaRef, InteropVarExpr->getType())) { in isValidInteropVariable()
16732 SemaRef.Diag(VarLoc, diag::err_omp_interop_variable_expected) in isValidInteropVariable()
16743 if (!isValidInteropVariable(SemaRef, InteropVar, VarLoc, OMPC_init)) in ActOnOpenMPInitClause()
16770 if (!isValidInteropVariable(SemaRef, InteropVar, VarLoc, OMPC_use)) in ActOnOpenMPUseClause()
16790 !isValidInteropVariable(SemaRef, InteropVar, VarLoc, OMPC_destroy)) in ActOnOpenMPDestroyClause()
16807 ExprResult Val = SemaRef.CheckBooleanCondition(StartLoc, Condition); in ActOnOpenMPNovariantsClause()
16811 ValExpr = SemaRef.MakeFullExpr(Val.get()).get(); in ActOnOpenMPNovariantsClause()
16817 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPNovariantsClause()
16818 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPNovariantsClause()
16820 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPNovariantsClause()
16839 ExprResult Val = SemaRef.CheckBooleanCondition(StartLoc, Condition); in ActOnOpenMPNocontextClause()
16843 ValExpr = SemaRef.MakeFullExpr(Val.get()).get(); in ActOnOpenMPNocontextClause()
16849 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPNocontextClause()
16850 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPNocontextClause()
16852 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPNocontextClause()
16872 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPFilterClause()
16873 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPFilterClause()
16875 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPFilterClause()
17081 ExprResult Res = SemaRef.BuildDeclRefExpr( in getOpenMPCapturedExpr()
17086 Res = SemaRef.CreateBuiltinUnaryOp(Loc, UO_Deref, Res.get()); in getOpenMPCapturedExpr()
17091 Res = SemaRef.DefaultLvalueConversion(Res.get()); in getOpenMPCapturedExpr()
17111 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPPrivateClause()
17127 if (SemaRef.RequireCompleteType(ELoc, Type, in ActOnOpenMPPrivateClause()
17140 if (rejectConstNotMutableType(SemaRef, D, Type, OMPC_private, ELoc)) in ActOnOpenMPPrivateClause()
17154 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPPrivateClause()
17196 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPPrivateClause()
17212 buildVarDecl(SemaRef, ELoc, Type, D->getName(), in ActOnOpenMPPrivateClause()
17215 SemaRef.ActOnUninitializedDecl(VDPrivate); in ActOnOpenMPPrivateClause()
17219 SemaRef, VDPrivate, RefExpr->getType().getUnqualifiedType(), ELoc); in ActOnOpenMPPrivateClause()
17222 if (!VD && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPPrivateClause()
17226 Ref = buildDeclRefExpr(SemaRef, VD, VD->getType().getNonReferenceType(), in ActOnOpenMPPrivateClause()
17229 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/false); in ActOnOpenMPPrivateClause()
17233 Vars.push_back((VD || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPPrivateClause()
17263 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPFirstprivateClause()
17281 if (SemaRef.RequireCompleteType(ELoc, Type, in ActOnOpenMPFirstprivateClause()
17315 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
17335 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
17366 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
17399 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
17428 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
17450 buildVarDecl(SemaRef, ELoc, Type, D->getName(), in ActOnOpenMPFirstprivateClause()
17463 buildVarDecl(SemaRef, RefExpr->getExprLoc(), ElemType, D->getName()); in ActOnOpenMPFirstprivateClause()
17464 VDInitRefExpr = buildDeclRefExpr(SemaRef, VDInit, ElemType, ELoc); in ActOnOpenMPFirstprivateClause()
17465 Expr *Init = SemaRef.DefaultLvalueConversion(VDInitRefExpr).get(); in ActOnOpenMPFirstprivateClause()
17467 VarDecl *VDInitTemp = buildVarDecl(SemaRef, RefExpr->getExprLoc(), in ActOnOpenMPFirstprivateClause()
17473 InitializationSequence InitSeq(SemaRef, Entity, Kind, Init); in ActOnOpenMPFirstprivateClause()
17474 ExprResult Result = InitSeq.Perform(SemaRef, Entity, Kind, Init); in ActOnOpenMPFirstprivateClause()
17482 VarDecl *VDInit = buildVarDecl(SemaRef, RefExpr->getExprLoc(), Type, in ActOnOpenMPFirstprivateClause()
17484 VDInitRefExpr = buildDeclRefExpr(SemaRef, VDInit, RefExpr->getType(), in ActOnOpenMPFirstprivateClause()
17486 SemaRef.AddInitializerToDecl( in ActOnOpenMPFirstprivateClause()
17487 VDPrivate, SemaRef.DefaultLvalueConversion(VDInitRefExpr).get(), in ActOnOpenMPFirstprivateClause()
17497 SemaRef.CurContext->addDecl(VDPrivate); in ActOnOpenMPFirstprivateClause()
17499 SemaRef, VDPrivate, RefExpr->getType().getUnqualifiedType(), in ActOnOpenMPFirstprivateClause()
17502 if (!VD && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPFirstprivateClause()
17510 buildDeclRefExpr(SemaRef, VD, VD->getType().getNonReferenceType(), in ActOnOpenMPFirstprivateClause()
17513 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPFirstprivateClause()
17520 Vars.push_back((VD || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPFirstprivateClause()
17559 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPLastprivateClause()
17577 if (SemaRef.RequireCompleteType(ELoc, Type, in ActOnOpenMPLastprivateClause()
17590 if (rejectConstNotMutableType(SemaRef, D, Type, OMPC_lastprivate, ELoc)) in ActOnOpenMPLastprivateClause()
17623 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPLastprivateClause()
17642 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPLastprivateClause()
17656 VarDecl *SrcVD = buildVarDecl(SemaRef, ERange.getBegin(), in ActOnOpenMPLastprivateClause()
17660 buildDeclRefExpr(SemaRef, SrcVD, Type.getUnqualifiedType(), ELoc); in ActOnOpenMPLastprivateClause()
17662 buildVarDecl(SemaRef, ERange.getBegin(), Type, ".lastprivate.dst", in ActOnOpenMPLastprivateClause()
17664 DeclRefExpr *PseudoDstExpr = buildDeclRefExpr(SemaRef, DstVD, Type, ELoc); in ActOnOpenMPLastprivateClause()
17667 ExprResult AssignmentOp = SemaRef.BuildBinOp(/*S=*/nullptr, ELoc, BO_Assign, in ActOnOpenMPLastprivateClause()
17671 AssignmentOp = SemaRef.ActOnFinishFullExpr(AssignmentOp.get(), ELoc, in ActOnOpenMPLastprivateClause()
17677 if (!VD && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPLastprivateClause()
17681 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/false); in ActOnOpenMPLastprivateClause()
17688 ExprResult RefRes = SemaRef.DefaultLvalueConversion(Ref); in ActOnOpenMPLastprivateClause()
17692 SemaRef.BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, in ActOnOpenMPLastprivateClause()
17697 SemaRef.IgnoredValueConversions(PostUpdateRes.get()).get()); in ActOnOpenMPLastprivateClause()
17701 Vars.push_back((VD || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPLastprivateClause()
17716 buildPostUpdate(SemaRef, ExprPostUpdates)); in ActOnOpenMPLastprivateClause()
17729 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPSharedClause()
17751 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPSharedClause()
17757 !SemaRef.CurContext->isDependentContext()) in ActOnOpenMPSharedClause()
17758 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPSharedClause()
17760 Vars.push_back((VD || !Ref || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPSharedClause()
17815 TransformExprToCaptures(Sema &SemaRef, ValueDecl *FieldDecl) in TransformExprToCaptures() argument
17816 : BaseTransform(SemaRef), Field(FieldDecl), CapturedExpr(nullptr) {} in TransformExprToCaptures()
17821 CapturedExpr = buildCapture(SemaRef, Field, E, /*WithInit=*/false); in TransformMemberExpr()
17842 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D) { in findAcceptableDecl() argument
17843 assert(!LookupResult::isVisible(SemaRef, D) && "not in slow case"); in findAcceptableDecl()
17851 if (LookupResult::isVisible(SemaRef, ND)) in findAcceptableDecl()
17859 argumentDependentLookup(Sema &SemaRef, const DeclarationNameInfo &Id, in argumentDependentLookup() argument
17867 SemaRef.FindAssociatedClassesAndNamespaces(Loc, &OVE, AssociatedNamespaces, in argumentDependentLookup()
17903 if (!SemaRef.isVisible(D)) { in argumentDependentLookup()
17904 D = findAcceptableDecl(SemaRef, D); in argumentDependentLookup()
17917 buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, in buildDeclareReductionRef() argument
17925 LookupResult Lookup(SemaRef, ReductionId, Sema::LookupOMPReductionName); in buildDeclareReductionRef()
17927 while (S && SemaRef.LookupParsedName(Lookup, S, &ReductionIdScopeSpec, in buildDeclareReductionRef()
17951 if (SemaRef.CurContext->isDependentContext() || Ty->isDependentType() || in buildDeclareReductionRef()
17969 SemaRef.Context, /*NamingClass=*/nullptr, in buildDeclareReductionRef()
17970 ReductionIdScopeSpec.getWithLocInContext(SemaRef.Context), ReductionId, in buildDeclareReductionRef()
17987 LookupResult Lookup(SemaRef, ReductionId, Sema::LookupOMPReductionName); in buildDeclareReductionRef()
17992 if (SemaRef.isCompleteType(Loc, Ty) || TyRec->isBeingDefined() || in buildDeclareReductionRef()
17995 SemaRef.LookupQualifiedName(Lookup, TyRec->getDecl()); in buildDeclareReductionRef()
18003 if (SemaRef.getLangOpts().CPlusPlus) in buildDeclareReductionRef()
18004 argumentDependentLookup(SemaRef, ReductionId, Loc, Ty, Lookups); in buildDeclareReductionRef()
18006 Lookups, [&SemaRef, Ty](ValueDecl *D) -> ValueDecl * { in buildDeclareReductionRef()
18008 SemaRef.Context.hasSameType(D->getType(), Ty)) in buildDeclareReductionRef()
18012 return SemaRef.BuildDeclRefExpr(VD, VD->getType().getNonReferenceType(), in buildDeclareReductionRef()
18014 if (SemaRef.getLangOpts().CPlusPlus) { in buildDeclareReductionRef()
18016 Lookups, [&SemaRef, Ty, Loc](ValueDecl *D) -> ValueDecl * { in buildDeclareReductionRef()
18018 SemaRef.IsDerivedFrom(Loc, Ty, D->getType()) && in buildDeclareReductionRef()
18025 if (SemaRef.IsDerivedFrom(Loc, Ty, VD->getType(), Paths)) { in buildDeclareReductionRef()
18026 if (!Paths.isAmbiguous(SemaRef.Context.getCanonicalType( in buildDeclareReductionRef()
18028 if (SemaRef.CheckBaseClassAccess( in buildDeclareReductionRef()
18031 SemaRef.BuildBasePathArray(Paths, BasePath); in buildDeclareReductionRef()
18032 return SemaRef.BuildDeclRefExpr( in buildDeclareReductionRef()
18040 SemaRef.Diag(Loc, diag::err_omp_not_resolved_reduction_identifier) in buildDeclareReductionRef()
18971 if (actOnOMPReductionKindClause(SemaRef, DSAStack, OMPC_reduction, VarList, in ActOnOpenMPReductionClause()
18984 buildPostUpdate(SemaRef, RD.ExprPostUpdates)); in ActOnOpenMPReductionClause()
18993 if (actOnOMPReductionKindClause(SemaRef, DSAStack, OMPC_task_reduction, in ActOnOpenMPTaskReductionClause()
19004 buildPostUpdate(SemaRef, RD.ExprPostUpdates)); in ActOnOpenMPTaskReductionClause()
19013 if (actOnOMPReductionKindClause(SemaRef, DSAStack, OMPC_in_reduction, VarList, in ActOnOpenMPInReductionClause()
19024 buildPostUpdate(SemaRef, RD.ExprPostUpdates)); in ActOnOpenMPInReductionClause()
19043 if (SemaRef.RequireCompleteType(ELoc, Type, in CheckOpenMPLinearDecl()
19060 rejectConstNotMutableType(SemaRef, D, Type, OMPC_linear, ELoc)) in CheckOpenMPLinearDecl()
19104 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPLinearClause()
19126 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPLinearClause()
19136 buildVarDecl(SemaRef, ELoc, Type, D->getName(), in ActOnOpenMPLinearClause()
19139 DeclRefExpr *PrivateRef = buildDeclRefExpr(SemaRef, Private, Type, ELoc); in ActOnOpenMPLinearClause()
19141 VarDecl *Init = buildVarDecl(SemaRef, ELoc, Type, ".linear.start"); in ActOnOpenMPLinearClause()
19144 if (!VD && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPLinearClause()
19145 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/false); in ActOnOpenMPLinearClause()
19149 ExprResult RefRes = SemaRef.DefaultLvalueConversion(Ref); in ActOnOpenMPLinearClause()
19153 SemaRef.BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, in ActOnOpenMPLinearClause()
19158 SemaRef.IgnoredValueConversions(PostUpdateRes.get()).get()); in ActOnOpenMPLinearClause()
19166 SemaRef.AddInitializerToDecl( in ActOnOpenMPLinearClause()
19167 Init, SemaRef.DefaultLvalueConversion(InitExpr).get(), in ActOnOpenMPLinearClause()
19169 DeclRefExpr *InitRef = buildDeclRefExpr(SemaRef, Init, Type, ELoc); in ActOnOpenMPLinearClause()
19172 Vars.push_back((VD || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPLinearClause()
19195 buildVarDecl(SemaRef, StepLoc, StepExpr->getType(), ".linear.step"); in ActOnOpenMPLinearClause()
19197 buildDeclRefExpr(SemaRef, SaveVar, StepExpr->getType(), StepLoc); in ActOnOpenMPLinearClause()
19198 ExprResult CalcStep = SemaRef.BuildBinOp( in ActOnOpenMPLinearClause()
19199 SemaRef.getCurScope(), StepLoc, BO_Assign, SaveRef.get(), StepExpr); in ActOnOpenMPLinearClause()
19201 SemaRef.ActOnFinishFullExpr(CalcStep.get(), /*DiscardedValue*/ false); in ActOnOpenMPLinearClause()
19221 buildPostUpdate(SemaRef, ExprPostUpdates)); in ActOnOpenMPLinearClause()
19225 Expr *NumIterations, Sema &SemaRef, in FinishOpenMPLinearClause() argument
19236 Step = SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get(); in FinishOpenMPLinearClause()
19247 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in FinishOpenMPLinearClause()
19261 SemaRef.Diag(ELoc, in FinishOpenMPLinearClause()
19277 buildDeclRefExpr(SemaRef, cast<VarDecl>(DE->getDecl()), in FinishOpenMPLinearClause()
19285 SemaRef, S, RefExpr->getExprLoc(), *CurPrivate, InitExpr, IV, Step, in FinishOpenMPLinearClause()
19289 Update = SemaRef.ActOnFinishFullExpr(Update.get(), DE->getBeginLoc(), in FinishOpenMPLinearClause()
19295 Final = SemaRef.BuildBinOp( in FinishOpenMPLinearClause()
19297 SemaRef.DefaultLvalueConversion(*CurPrivate).get()); in FinishOpenMPLinearClause()
19300 Final = SemaRef.ActOnFinishFullExpr(Final.get(), DE->getBeginLoc(), in FinishOpenMPLinearClause()
19336 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPAlignedClause()
19376 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPAlignedClause()
19377 Vars.push_back(SemaRef in ActOnOpenMPAlignedClause()
19462 buildVarDecl(SemaRef, DE->getBeginLoc(), ElemType.getUnqualifiedType(), in ActOnOpenMPCopyinClause()
19465 SemaRef, SrcVD, ElemType.getUnqualifiedType(), DE->getExprLoc()); in ActOnOpenMPCopyinClause()
19467 buildVarDecl(SemaRef, DE->getBeginLoc(), ElemType, ".copyin.dst", in ActOnOpenMPCopyinClause()
19470 buildDeclRefExpr(SemaRef, DstVD, ElemType, DE->getExprLoc()); in ActOnOpenMPCopyinClause()
19474 SemaRef.BuildBinOp(/*S=*/nullptr, DE->getExprLoc(), BO_Assign, in ActOnOpenMPCopyinClause()
19479 SemaRef.ActOnFinishFullExpr(AssignmentOp.get(), DE->getExprLoc(), in ActOnOpenMPCopyinClause()
19511 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPCopyprivateClause()
19537 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPCopyprivateClause()
19550 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPCopyprivateClause()
19577 buildVarDecl(SemaRef, RefExpr->getBeginLoc(), Type, ".copyprivate.src", in ActOnOpenMPCopyprivateClause()
19579 DeclRefExpr *PseudoSrcExpr = buildDeclRefExpr(SemaRef, SrcVD, Type, ELoc); in ActOnOpenMPCopyprivateClause()
19581 buildVarDecl(SemaRef, RefExpr->getBeginLoc(), Type, ".copyprivate.dst", in ActOnOpenMPCopyprivateClause()
19583 DeclRefExpr *PseudoDstExpr = buildDeclRefExpr(SemaRef, DstVD, Type, ELoc); in ActOnOpenMPCopyprivateClause()
19584 ExprResult AssignmentOp = SemaRef.BuildBinOp( in ActOnOpenMPCopyprivateClause()
19588 AssignmentOp = SemaRef.ActOnFinishFullExpr(AssignmentOp.get(), ELoc, in ActOnOpenMPCopyprivateClause()
19598 : buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/false)); in ActOnOpenMPCopyprivateClause()
19647 bool OMPDependTFound = findOMPDependT(SemaRef, StartLoc, DSAStack); in ActOnOpenMPDepobjClause()
19682 ProcessOpenMPDoacrossClauseCommon(Sema &SemaRef, bool IsSource, in ProcessOpenMPDoacrossClauseCommon() argument
19693 TotalDepCount = OrderedCountExpr->EvaluateKnownConstInt(SemaRef.Context); in ProcessOpenMPDoacrossClauseCommon()
19710 SemaRef.Diag(ELoc, diag::err_omp_depend_sink_unexpected_expr); in ProcessOpenMPDoacrossClauseCommon()
19722 if (SemaRef.CurContext->isDependentContext()) { in ProcessOpenMPDoacrossClauseCommon()
19753 auto Res = getPrivateItem(SemaRef, LHS, ELoc, ERange); in ProcessOpenMPDoacrossClauseCommon()
19763 SemaRef.Diag(OOLoc, diag::err_omp_depend_sink_expected_plus_minus); in ProcessOpenMPDoacrossClauseCommon()
19768 SemaRef.OpenMP().VerifyPositiveIntegerConstantInClause( in ProcessOpenMPDoacrossClauseCommon()
19773 if (!SemaRef.CurContext->isDependentContext() && in ProcessOpenMPDoacrossClauseCommon()
19779 SemaRef.Diag(ELoc, diag::err_omp_depend_sink_expected_loop_iteration) in ProcessOpenMPDoacrossClauseCommon()
19782 SemaRef.Diag(ELoc, diag::err_omp_depend_sink_expected_loop_iteration) in ProcessOpenMPDoacrossClauseCommon()
19790 if (!SemaRef.CurContext->isDependentContext() && !IsSource && in ProcessOpenMPDoacrossClauseCommon()
19794 SemaRef.Diag(EndLoc, diag::err_omp_depend_sink_expected_loop_iteration) in ProcessOpenMPDoacrossClauseCommon()
19858 SemaRef, DepKind == OMPC_DEPEND_source, VarList, DSAStack, EndLoc); in ActOnOpenMPDependClause()
19876 OMPDependTFound = findOMPDependT(SemaRef, StartLoc, DSAStack, in ActOnOpenMPDependClause()
19960 Sema::TentativeAnalysisScope Trap(SemaRef); in ActOnOpenMPDependClause()
19961 Res = SemaRef.CreateBuiltinUnaryOp(ELoc, UO_AddrOf, in ActOnOpenMPDependClause()
20014 ErrorFound = !isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_device, in ActOnOpenMPDeviceClause()
20025 SemaRef.targetDiag( in ActOnOpenMPDeviceClause()
20036 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPDeviceClause()
20037 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPDeviceClause()
20039 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPDeviceClause()
20048 static bool checkTypeMappable(SourceLocation SL, SourceRange SR, Sema &SemaRef, in checkTypeMappable() argument
20051 if (SemaRef.RequireCompleteType(SL, QTy, diag::err_incomplete_type)) in checkTypeMappable()
20053 if (FullCheck && !SemaRef.CurContext->isDependentContext() && in checkTypeMappable()
20054 !QTy.isTriviallyCopyableType(SemaRef.Context)) in checkTypeMappable()
20055 SemaRef.Diag(SL, diag::warn_omp_non_trivial_type_mapped) << QTy << SR; in checkTypeMappable()
20062 static bool checkArrayExpressionDoesNotReferToWholeSize(Sema &SemaRef, in checkArrayExpressionDoesNotReferToWholeSize() argument
20086 if (!LowerBound->EvaluateAsInt(Result, SemaRef.getASTContext())) in checkArrayExpressionDoesNotReferToWholeSize()
20110 if (!Length->EvaluateAsInt(Result, SemaRef.getASTContext())) in checkArrayExpressionDoesNotReferToWholeSize()
20120 static bool checkArrayExpressionDoesNotReferToUnitySize(Sema &SemaRef, in checkArrayExpressionDoesNotReferToUnitySize() argument
20146 if (!Length->EvaluateAsInt(Result, SemaRef.getASTContext())) in checkArrayExpressionDoesNotReferToUnitySize()
20190 Sema &SemaRef; member in __anon1dd12e447211::MapBaseChecker
20205 if (SemaRef.getLangOpts().OpenMP < 50) { in emitErrorMsg()
20206 SemaRef.Diag(ELoc, in emitErrorMsg()
20210 SemaRef.Diag(ELoc, diag::err_omp_non_lvalue_in_map_or_motion_clauses) in emitErrorMsg()
20242 SemaRef.Diag(ELoc, diag::err_omp_expected_access_to_data_field) in VisitMemberExpr()
20258 SemaRef.Diag(ELoc, diag::err_omp_bit_fields_forbidden_in_clause) in VisitMemberExpr()
20278 SemaRef.Diag(ELoc, diag::err_omp_union_type_not_allowed) in VisitMemberExpr()
20305 SemaRef.Diag(ELoc, diag::err_omp_expected_base_var_name) in VisitArraySubscriptExpr()
20315 if (checkArrayExpressionDoesNotReferToWholeSize(SemaRef, AE, E->getType())) in VisitArraySubscriptExpr()
20321 AE->getIdx()->EvaluateAsInt(Result, SemaRef.getASTContext()) && in VisitArraySubscriptExpr()
20323 SemaRef.Diag(AE->getIdx()->getExprLoc(), in VisitArraySubscriptExpr()
20325 SemaRef.Diag(AE->getIdx()->getExprLoc(), in VisitArraySubscriptExpr()
20341 assert(!(SemaRef.getLangOpts().OpenMP < 50 && NoDiagnose) && in VisitArraySectionExpr()
20356 SemaRef.Diag(ELoc, diag::err_omp_expected_base_var_name) in VisitArraySectionExpr()
20362 checkArrayExpressionDoesNotReferToWholeSize(SemaRef, OASE, CurType); in VisitArraySectionExpr()
20364 checkArrayExpressionDoesNotReferToUnitySize(SemaRef, OASE, CurType); in VisitArraySectionExpr()
20376 SemaRef.getLangOpts().OpenMP >= 50) { in VisitArraySectionExpr()
20378 SemaRef.Diag(ELoc, diag::err_omp_section_length_undefined) in VisitArraySectionExpr()
20387 SemaRef.Diag(ELoc, in VisitArraySectionExpr()
20400 OASE->getLength()->EvaluateAsInt(ResultR, SemaRef.getASTContext()) && in VisitArraySectionExpr()
20402 SemaRef.Diag(OASE->getLength()->getExprLoc(), in VisitArraySectionExpr()
20404 SemaRef.Diag(OASE->getLength()->getExprLoc(), in VisitArraySectionExpr()
20409 SemaRef.getASTContext()) && in VisitArraySectionExpr()
20411 SemaRef.Diag(OASE->getLowerBound()->getExprLoc(), in VisitArraySectionExpr()
20413 SemaRef.Diag(OASE->getLowerBound()->getExprLoc(), in VisitArraySectionExpr()
20434 if (SemaRef.getLangOpts().OpenMP < 50 || !UO->isLValue() || in VisitUnaryOperator()
20446 if (SemaRef.getLangOpts().OpenMP < 50 || !BO->getType()->isPointerType()) { in VisitBinaryOperator()
20490 Sema &SemaRef, OpenMPClauseKind CKind, OpenMPDirectiveKind DKind, in MapBaseChecker() argument
20493 : SemaRef(SemaRef), CKind(CKind), DKind(DKind), Components(Components), in MapBaseChecker()
20503 Sema &SemaRef, Expr *E, in checkMapClauseExpressionBase() argument
20508 MapBaseChecker Checker(SemaRef, CKind, DKind, CurComponents, NoDiagnose, ELoc, in checkMapClauseExpressionBase()
20512 if (SemaRef.getLangOpts().OpenMP >= 50 && !CurComponents.empty() && in checkMapClauseExpressionBase()
20523 SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_length) in checkMapClauseExpressionBase()
20535 Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, in checkMapConflicts() argument
20557 [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, in checkMapConflicts()
20562 if (CKind == Kind && SemaRef.LangOpts.OpenMP >= 50) in checkMapConflicts()
20593 SemaRef.Diag(CI->getAssociatedExpression()->getExprLoc(), in checkMapConflicts()
20596 SemaRef.Diag(SI->getAssociatedExpression()->getExprLoc(), in checkMapConflicts()
20629 SemaRef, SI->getAssociatedExpression(), Type)) in checkMapConflicts()
20642 SemaRef.Diag(ELoc, diag::err_omp_map_shared_storage) << ERange; in checkMapConflicts()
20645 SemaRef.Diag(ELoc, diag::err_omp_once_referenced_in_target_update) in checkMapConflicts()
20648 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in checkMapConflicts()
20681 SemaRef.Diag( in checkMapConflicts()
20685 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in checkMapConflicts()
20694 SemaRef.Diag(DerivedLoc, diag::err_omp_same_pointer_dereferenced) in checkMapConflicts()
20696 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in checkMapConflicts()
20729 SemaRef.Diag(ELoc, diag::err_omp_map_shared_storage) << ERange; in checkMapConflicts()
20732 SemaRef.Diag(ELoc, diag::err_omp_once_referenced_in_target_update) in checkMapConflicts()
20735 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in checkMapConflicts()
20768 SemaRef.Diag(ELoc, in checkMapConflicts()
20771 SemaRef.Diag(EnclosingExpr->getExprLoc(), diag::note_used_here) in checkMapConflicts()
20781 static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S, in buildUserDefinedMapperRef() argument
20795 LookupResult Lookup(SemaRef, MapperId, Sema::LookupOMPMapperName); in buildUserDefinedMapperRef()
20798 while (S && SemaRef.LookupParsedName(Lookup, S, &MapperIdScopeSpec, in buildUserDefinedMapperRef()
20820 if (SemaRef.CurContext->isDependentContext() || Type->isDependentType() || in buildUserDefinedMapperRef()
20836 SemaRef.Context, /*NamingClass=*/nullptr, in buildUserDefinedMapperRef()
20837 MapperIdScopeSpec.getWithLocInContext(SemaRef.Context), MapperId, in buildUserDefinedMapperRef()
20846 SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type); in buildUserDefinedMapperRef()
20850 if (SemaRef.getLangOpts().CPlusPlus && !MapperIdScopeSpec.isSet()) in buildUserDefinedMapperRef()
20851 argumentDependentLookup(SemaRef, MapperId, Loc, Type, Lookups); in buildUserDefinedMapperRef()
20854 Lookups, [&SemaRef, Type](ValueDecl *D) -> ValueDecl * { in buildUserDefinedMapperRef()
20856 SemaRef.Context.hasSameType(D->getType(), Type)) in buildUserDefinedMapperRef()
20860 return SemaRef.BuildDeclRefExpr(VD, Type, VK_LValue, Loc); in buildUserDefinedMapperRef()
20864 Lookups, [&SemaRef, Type, Loc](ValueDecl *D) -> ValueDecl * { in buildUserDefinedMapperRef()
20866 SemaRef.IsDerivedFrom(Loc, Type, D->getType()) && in buildUserDefinedMapperRef()
20873 if (SemaRef.IsDerivedFrom(Loc, Type, VD->getType(), Paths)) { in buildUserDefinedMapperRef()
20874 if (!Paths.isAmbiguous(SemaRef.Context.getCanonicalType( in buildUserDefinedMapperRef()
20876 if (SemaRef.CheckBaseClassAccess( in buildUserDefinedMapperRef()
20879 return SemaRef.BuildDeclRefExpr(VD, Type, VK_LValue, Loc); in buildUserDefinedMapperRef()
20886 SemaRef.Diag(Loc, diag::err_omp_invalid_mapper) in buildUserDefinedMapperRef()
20924 Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, in checkMappableExpressionList() argument
20940 auto &DeclNames = SemaRef.getASTContext().DeclarationNames; in checkMappableExpressionList()
20942 &SemaRef.getASTContext().Idents.get("default"))); in checkMappableExpressionList()
20982 SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, in checkMappableExpressionList()
20996 if (SemaRef.getLangOpts().OpenMP < 50) { in checkMappableExpressionList()
20997 SemaRef.Diag( in checkMappableExpressionList()
21001 SemaRef.Diag(ELoc, diag::err_omp_non_lvalue_in_map_or_motion_clauses) in checkMappableExpressionList()
21013 checkMapClauseExpressionBase(SemaRef, SimpleExpr, CurComponents, CKind, in checkMappableExpressionList()
21026 SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, in checkMappableExpressionList()
21063 SemaRef.Diag(ELoc, diag::err_omp_threadprivate_in_clause) in checkMappableExpressionList()
21065 reportOriginalDsa(SemaRef, DSAS, VD, DVar); in checkMappableExpressionList()
21077 if (checkMapConflicts(SemaRef, DSAS, CurDeclaration, SimpleExpr, in checkMappableExpressionList()
21081 (SemaRef.getLangOpts().OpenMP <= 45 || StartLoc.isValid()) && in checkMappableExpressionList()
21082 checkMapConflicts(SemaRef, DSAS, CurDeclaration, SimpleExpr, in checkMappableExpressionList()
21121 if (!checkTypeMappable(VE->getExprLoc(), VE->getSourceRange(), SemaRef, in checkMappableExpressionList()
21134 SemaRef.getLangOpts().OpenMP >= 52)) { in checkMappableExpressionList()
21135 SemaRef.Diag(StartLoc, diag::err_omp_invalid_map_type_for_directive) in checkMappableExpressionList()
21149 MapType == OMPC_MAP_delete || SemaRef.getLangOpts().OpenMP >= 52)) { in checkMappableExpressionList()
21150 SemaRef.Diag(StartLoc, diag::err_omp_invalid_map_type_for_directive) in checkMappableExpressionList()
21164 SemaRef.Diag(StartLoc, in checkMappableExpressionList()
21180 SemaRef.Diag(StartLoc, diag::err_omp_invalid_map_type_for_directive) in checkMappableExpressionList()
21195 if (VD && ((SemaRef.LangOpts.OpenMP <= 45 && in checkMappableExpressionList()
21200 SemaRef.Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) in checkMappableExpressionList()
21204 reportOriginalDsa(SemaRef, DSAS, CurDeclaration, DVar); in checkMappableExpressionList()
21212 SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, in checkMappableExpressionList()
21272 checkMappableExpressionList(SemaRef, DSAStack, OMPC_map, MVLI, Locs.StartLoc, in ActOnOpenMPMapClause()
21290 QualType ReductionType = SemaRef.GetTypeFromParser(ParsedType.get()); in ActOnOpenMPDeclareReductionType()
21326 LookupResult Lookup(SemaRef, Name, SourceLocation(), in ActOnOpenMPDeclareReductionDirectiveStart()
21328 SemaRef.forRedeclarationInCurContext()); in ActOnOpenMPDeclareReductionDirectiveStart()
21339 FunctionScopeInfo *ParentFn = SemaRef.getEnclosingFunction(); in ActOnOpenMPDeclareReductionDirectiveStart()
21342 SemaRef.LookupName(Lookup, S); in ActOnOpenMPDeclareReductionDirectiveStart()
21343 SemaRef.FilterLookupForScope(Lookup, DC, S, /*ConsiderLinkage=*/false, in ActOnOpenMPDeclareReductionDirectiveStart()
21406 SemaRef.PushFunctionScope(); in ActOnOpenMPDeclareReductionCombinerStart()
21407 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPDeclareReductionCombinerStart()
21408 SemaRef.getCurFunction()->setHasOMPDeclareReductionCombiner(); in ActOnOpenMPDeclareReductionCombinerStart()
21411 SemaRef.PushDeclContext(S, DRD); in ActOnOpenMPDeclareReductionCombinerStart()
21413 SemaRef.CurContext = DRD; in ActOnOpenMPDeclareReductionCombinerStart()
21415 SemaRef.PushExpressionEvaluationContext( in ActOnOpenMPDeclareReductionCombinerStart()
21426 buildVarDecl(SemaRef, D->getLocation(), ReductionType, "omp_in"); in ActOnOpenMPDeclareReductionCombinerStart()
21434 buildVarDecl(SemaRef, D->getLocation(), ReductionType, "omp_out"); in ActOnOpenMPDeclareReductionCombinerStart()
21436 SemaRef.PushOnScopeChains(OmpInParm, S); in ActOnOpenMPDeclareReductionCombinerStart()
21437 SemaRef.PushOnScopeChains(OmpOutParm, S); in ActOnOpenMPDeclareReductionCombinerStart()
21443 ::buildDeclRefExpr(SemaRef, OmpInParm, ReductionType, D->getLocation()); in ActOnOpenMPDeclareReductionCombinerStart()
21445 ::buildDeclRefExpr(SemaRef, OmpOutParm, ReductionType, D->getLocation()); in ActOnOpenMPDeclareReductionCombinerStart()
21452 SemaRef.DiscardCleanupsInEvaluationContext(); in ActOnOpenMPDeclareReductionCombinerEnd()
21453 SemaRef.PopExpressionEvaluationContext(); in ActOnOpenMPDeclareReductionCombinerEnd()
21455 SemaRef.PopDeclContext(); in ActOnOpenMPDeclareReductionCombinerEnd()
21456 SemaRef.PopFunctionScopeInfo(); in ActOnOpenMPDeclareReductionCombinerEnd()
21469 SemaRef.PushFunctionScope(); in ActOnOpenMPDeclareReductionInitializerStart()
21470 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPDeclareReductionInitializerStart()
21473 SemaRef.PushDeclContext(S, DRD); in ActOnOpenMPDeclareReductionInitializerStart()
21475 SemaRef.CurContext = DRD; in ActOnOpenMPDeclareReductionInitializerStart()
21477 SemaRef.PushExpressionEvaluationContext( in ActOnOpenMPDeclareReductionInitializerStart()
21488 buildVarDecl(SemaRef, D->getLocation(), ReductionType, "omp_priv"); in ActOnOpenMPDeclareReductionInitializerStart()
21496 buildVarDecl(SemaRef, D->getLocation(), ReductionType, "omp_orig"); in ActOnOpenMPDeclareReductionInitializerStart()
21498 SemaRef.PushOnScopeChains(OmpPrivParm, S); in ActOnOpenMPDeclareReductionInitializerStart()
21499 SemaRef.PushOnScopeChains(OmpOrigParm, S); in ActOnOpenMPDeclareReductionInitializerStart()
21505 ::buildDeclRefExpr(SemaRef, OmpOrigParm, ReductionType, D->getLocation()); in ActOnOpenMPDeclareReductionInitializerStart()
21507 ::buildDeclRefExpr(SemaRef, OmpPrivParm, ReductionType, D->getLocation()); in ActOnOpenMPDeclareReductionInitializerStart()
21515 SemaRef.DiscardCleanupsInEvaluationContext(); in ActOnOpenMPDeclareReductionInitializerEnd()
21516 SemaRef.PopExpressionEvaluationContext(); in ActOnOpenMPDeclareReductionInitializerEnd()
21518 SemaRef.PopDeclContext(); in ActOnOpenMPDeclareReductionInitializerEnd()
21519 SemaRef.PopFunctionScopeInfo(); in ActOnOpenMPDeclareReductionInitializerEnd()
21538 SemaRef.PushOnScopeChains(cast<OMPDeclareReductionDecl>(D), S, in ActOnOpenMPDeclareReductionDirectiveEnd()
21549 TypeSourceInfo *TInfo = SemaRef.GetTypeForDeclarator(D); in ActOnOpenMPDeclareMapperVarDecl()
21556 SemaRef.CheckExtraCXXDefaultArguments(D); in ActOnOpenMPDeclareMapperVarDecl()
21559 return SemaRef.CreateParsedType(T, TInfo); in ActOnOpenMPDeclareMapperVarDecl()
21566 QualType MapperType = SemaRef.GetTypeFromParser(ParsedType.get()); in ActOnOpenMPDeclareMapperType()
21582 LookupResult Lookup(SemaRef, Name, SourceLocation(), in ActOnOpenMPDeclareMapperDirective()
21584 SemaRef.forRedeclarationInCurContext()); in ActOnOpenMPDeclareMapperDirective()
21595 FunctionScopeInfo *ParentFn = SemaRef.getEnclosingFunction(); in ActOnOpenMPDeclareMapperDirective()
21598 SemaRef.LookupName(Lookup, S); in ActOnOpenMPDeclareMapperDirective()
21599 SemaRef.FilterLookupForScope(Lookup, DC, S, /*ConsiderLinkage=*/false, in ActOnOpenMPDeclareMapperDirective()
21646 processImplicitMapsWithDefaultMappers(SemaRef, DSAStack, in ActOnOpenMPDeclareMapperDirective()
21652 SemaRef.PushOnScopeChains(DMD, S); in ActOnOpenMPDeclareMapperDirective()
21677 SemaRef.PushOnScopeChains(VD, S, /*AddToContext=*/false); in ActOnOpenMPDeclareMapperDirectiveVarDecl()
21678 Expr *E = buildDeclRefExpr(SemaRef, VD, MapperType, StartLoc); in ActOnOpenMPDeclareMapperDirectiveVarDecl()
21717 if (!isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_num_teams, in ActOnOpenMPNumTeamsClause()
21725 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPNumTeamsClause()
21726 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPNumTeamsClause()
21728 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPNumTeamsClause()
21745 if (!isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_thread_limit, in ActOnOpenMPThreadLimitClause()
21753 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPThreadLimitClause()
21754 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPThreadLimitClause()
21756 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPThreadLimitClause()
21775 ValExpr, SemaRef, OMPC_priority, in ActOnOpenMPPriorityClause()
21806 if (!isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_grainsize, in ActOnOpenMPGrainsizeClause()
21841 ValExpr, SemaRef, OMPC_num_tasks, in ActOnOpenMPNumTasksClause()
21889 if (!findOMPEventHandleT(SemaRef, Evt->getExprLoc(), DSAStack)) in ActOnOpenMPDetachClause()
21922 reportOriginalDsa(SemaRef, DSAStack, VD, DVar); in ActOnOpenMPDetachClause()
21971 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPDistScheduleClause()
21972 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPDistScheduleClause()
21974 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPDistScheduleClause()
22073 DeclContext *CurLexicalContext = SemaRef.getCurLexicalContext(); in ActOnStartOpenMPDeclareTargetContext()
22116 LookupResult Lookup(SemaRef, Id, Sema::LookupOrdinaryName); in lookupOpenMPDeclareTargetName()
22117 SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, in lookupOpenMPDeclareTargetName()
22126 VarOrFuncDeclFilterCCC CCC(SemaRef); in lookupOpenMPDeclareTargetName()
22128 SemaRef.CorrectTypo(Id, Sema::LookupOrdinaryName, CurScope, nullptr, in lookupOpenMPDeclareTargetName()
22130 SemaRef.diagnoseTypo(Corrected, in lookupOpenMPDeclareTargetName()
22220 Sema &SemaRef, Decl *D) { in checkDeclInTargetContext() argument
22226 if (SemaRef.LangOpts.OpenMP >= 50 && in checkDeclInTargetContext()
22227 (SemaRef.getCurLambda(/*IgnoreNonLambdaCapturingScope=*/true) || in checkDeclInTargetContext()
22228 SemaRef.getCurBlock() || SemaRef.getCurCapturedRegion()) && in checkDeclInTargetContext()
22237 SemaRef.Diag(VD->getLocation(), in checkDeclInTargetContext()
22239 SemaRef.Diag(SL, diag::note_var_explicitly_captured_here) in checkDeclInTargetContext()
22246 SemaRef.Diag(VD->getLocation(), diag::warn_omp_not_in_target_context); in checkDeclInTargetContext()
22247 SemaRef.Diag(SL, diag::note_used_here) << SR; in checkDeclInTargetContext()
22251 Sema &SemaRef, DSAStackTy *Stack, in checkValueDeclInTarget() argument
22254 checkTypeMappable(SL, SR, SemaRef, Stack, VD->getType(), in checkValueDeclInTarget()
22273 reportOriginalDsa(SemaRef, DSAStack, VD, DSAStack->getTopDSA(VD, false)); in checkDeclIsAllowedInOpenMPTarget()
22292 !checkValueDeclInTarget(SL, SR, SemaRef, DSAStack, VD)) in checkDeclIsAllowedInOpenMPTarget()
22326 checkDeclInTargetContext(E->getExprLoc(), E->getSourceRange(), SemaRef, D); in checkDeclIsAllowedInOpenMPTarget()
22403 checkMappableExpressionList(SemaRef, DSAStack, OMPC_to, MVLI, Locs.StartLoc, in ActOnOpenMPToClause()
22440 checkMappableExpressionList(SemaRef, DSAStack, OMPC_from, MVLI, Locs.StartLoc, in ActOnOpenMPFromClause()
22463 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPUseDevicePtrClause()
22488 buildVarDecl(SemaRef, ELoc, Type, D->getName(), in ActOnOpenMPUseDevicePtrClause()
22494 SemaRef.CurContext->addDecl(VDPrivate); in ActOnOpenMPUseDevicePtrClause()
22496 SemaRef, VDPrivate, RefExpr->getType().getUnqualifiedType(), ELoc); in ActOnOpenMPUseDevicePtrClause()
22500 buildVarDecl(SemaRef, RefExpr->getExprLoc(), Type, ".devptr.temp"); in ActOnOpenMPUseDevicePtrClause()
22502 SemaRef, VDInit, RefExpr->getType(), RefExpr->getExprLoc()); in ActOnOpenMPUseDevicePtrClause()
22503 SemaRef.AddInitializerToDecl( in ActOnOpenMPUseDevicePtrClause()
22504 VDPrivate, SemaRef.DefaultLvalueConversion(VDInitRefExpr).get(), in ActOnOpenMPUseDevicePtrClause()
22511 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPUseDevicePtrClause()
22547 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange, in ActOnOpenMPUseDeviceAddrClause()
22562 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPUseDeviceAddrClause()
22578 SemaRef.DefaultFunctionArrayLvalueConversion(SimpleRefExpr).get(); in ActOnOpenMPUseDeviceAddrClause()
22600 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPIsDevicePtrClause()
22626 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPIsDevicePtrClause()
22684 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange, in ActOnOpenMPHasDeviceAddrClause()
22702 reportOriginalDsa(SemaRef, DSAStack, D, DVar); in ActOnOpenMPHasDeviceAddrClause()
22728 SemaRef.DefaultFunctionArrayLvalueConversion(SimpleRefExpr).get(); in ActOnOpenMPHasDeviceAddrClause()
22735 if (!VD && !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPHasDeviceAddrClause()
22737 buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/true); in ActOnOpenMPHasDeviceAddrClause()
22769 if (!findOMPAllocatorHandleT(SemaRef, Allocator->getExprLoc(), DSAStack)) in ActOnOpenMPAllocateClause()
22772 ExprResult AllocatorRes = SemaRef.DefaultLvalueConversion(Allocator); in ActOnOpenMPAllocateClause()
22775 AllocatorRes = SemaRef.PerformImplicitConversion( in ActOnOpenMPAllocateClause()
22790 SemaRef.targetDiag(StartLoc, diag::err_expected_allocator_expression); in ActOnOpenMPAllocateClause()
22799 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPAllocateClause()
22810 if (!VD && !SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAllocateClause()
22811 Ref = buildCapture(SemaRef, D, SimpleRefExpr, /*WithInit=*/false); in ActOnOpenMPAllocateClause()
22812 Vars.push_back((VD || SemaRef.CurContext->isDependentContext()) in ActOnOpenMPAllocateClause()
22836 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange); in ActOnOpenMPNontemporalClause()
22872 SemaRef.setFunctionHasBranchProtectedScope(); in ActOnOpenMPScopeDirective()
22888 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange, in ActOnOpenMPInclusiveClause()
22929 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange, in ActOnOpenMPExclusiveClause()
22984 if (!findOMPAllocatorHandleT(SemaRef, StartLoc, DSAStack)) in ActOnOpenMPUsesAllocatorClause()
22991 !findOMPAlloctraitT(SemaRef, StartLoc, DSAStack)) in ActOnOpenMPUsesAllocatorClause()
22999 PredefinedAllocators.insert(SemaRef.LookupSingleName( in ActOnOpenMPUsesAllocatorClause()
23000 SemaRef.TUScope, AllocatorName, StartLoc, Sema::LookupAnyName)); in ActOnOpenMPUsesAllocatorClause()
23017 getAllocatorKind(SemaRef, DSAStack, AllocatorExpr); in ActOnOpenMPUsesAllocatorClause()
23062 AllocatorExpr = SemaRef.DefaultLvalueConversion(AllocatorExpr).get(); in ActOnOpenMPUsesAllocatorClause()
23136 Sema::TentativeAnalysisScope Trap(SemaRef); in ActOnOpenMPAffinityClause()
23137 Res = SemaRef.CreateBuiltinUnaryOp(ELoc, UO_AddrOf, SimpleExpr); in ActOnOpenMPAffinityClause()
23179 if (!isNonNegativeIntegerValue(ValExpr, SemaRef, OMPC_ompx_dyn_cgroup_mem, in ActOnOpenMPXDynCGroupMemClause()
23187 !SemaRef.CurContext->isDependentContext()) { in ActOnOpenMPXDynCGroupMemClause()
23188 ValExpr = SemaRef.MakeFullExpr(ValExpr).get(); in ActOnOpenMPXDynCGroupMemClause()
23190 ValExpr = tryBuildCapture(SemaRef, ValExpr, Captures).get(); in ActOnOpenMPXDynCGroupMemClause()
23217 SemaRef, in ActOnOpenMPDoacrossClause()
23253 ExprResult Result = SemaRef.CheckPlaceholderExpr(Base); in ActOnOMPArraySectionExpr()
23259 ExprResult Result = SemaRef.CheckPlaceholderExpr(LowerBound); in ActOnOMPArraySectionExpr()
23262 Result = SemaRef.DefaultLvalueConversion(Result.get()); in ActOnOMPArraySectionExpr()
23268 ExprResult Result = SemaRef.CheckPlaceholderExpr(Length); in ActOnOMPArraySectionExpr()
23271 Result = SemaRef.DefaultLvalueConversion(Result.get()); in ActOnOMPArraySectionExpr()
23277 ExprResult Result = SemaRef.CheckPlaceholderExpr(Stride); in ActOnOMPArraySectionExpr()
23280 Result = SemaRef.DefaultLvalueConversion(Result.get()); in ActOnOMPArraySectionExpr()
23363 if (SemaRef.RequireCompleteType(Base->getExprLoc(), ResultTy, in ActOnOMPArraySectionExpr()
23422 ExprResult Result = SemaRef.DefaultFunctionArrayLvalueConversion(Base); in ActOnOMPArraySectionExpr()
23437 ExprResult Result = SemaRef.CheckPlaceholderExpr(Base); in ActOnOMPArrayShapingExpr()
23440 Result = SemaRef.DefaultLvalueConversion(Result.get()); in ActOnOMPArrayShapingExpr()
23462 ExprResult Result = SemaRef.CheckPlaceholderExpr(Dim); in ActOnOMPArrayShapingExpr()
23467 Result = SemaRef.DefaultLvalueConversion(Result.get()); in ActOnOMPArrayShapingExpr()
23557 VarDecl::Create(Context, SemaRef.CurContext, StartLoc, D.DeclIdentLoc, in ActOnOMPIteratorExpr()
23563 LookupResult Previous(SemaRef, NameInfo, Sema::LookupOrdinaryName, in ActOnOMPIteratorExpr()
23566 SemaRef.LookupName(Previous, S); in ActOnOMPIteratorExpr()
23568 SemaRef.FilterLookupForScope(Previous, SemaRef.CurContext, S, in ActOnOMPIteratorExpr()
23576 SemaRef.PushOnScopeChains(VD, S); in ActOnOMPIteratorExpr()
23579 SemaRef.CurContext->addDecl(VD); in ActOnOMPIteratorExpr()
23588 SemaRef.PerformImplicitConversion(Begin, DeclTy, Sema::AA_Converting); in ActOnOMPIteratorExpr()
23594 SemaRef.PerformImplicitConversion(End, DeclTy, Sema::AA_Converting); in ActOnOMPIteratorExpr()
23639 if (!SemaRef.CurContext->isDependentContext()) { in ActOnOMPIteratorExpr()
23645 ExprResult Res = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Sub, in ActOnOMPIteratorExpr()
23655 Res = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Add, Res.get(), in ActOnOMPIteratorExpr()
23662 Res = SemaRef.CreateBuiltinBinOp( in ActOnOMPIteratorExpr()
23664 SemaRef.ActOnIntegerConstant(D.AssignmentLoc, 1).get()); in ActOnOMPIteratorExpr()
23670 Res = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Div, Res.get(), in ActOnOMPIteratorExpr()
23676 St1 = SemaRef.CreateBuiltinUnaryOp(D.AssignmentLoc, UO_Minus, in ActOnOMPIteratorExpr()
23679 ExprResult Res1 = SemaRef.CreateBuiltinBinOp( in ActOnOMPIteratorExpr()
23686 Res1 = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Add, Res1.get(), in ActOnOMPIteratorExpr()
23693 Res1 = SemaRef.CreateBuiltinBinOp( in ActOnOMPIteratorExpr()
23695 SemaRef.ActOnIntegerConstant(D.AssignmentLoc, 1).get()); in ActOnOMPIteratorExpr()
23701 Res1 = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Div, Res1.get(), in ActOnOMPIteratorExpr()
23708 ExprResult CmpRes = SemaRef.CreateBuiltinBinOp( in ActOnOMPIteratorExpr()
23710 SemaRef.ActOnIntegerConstant(D.AssignmentLoc, 0).get()); in ActOnOMPIteratorExpr()
23715 Res = SemaRef.ActOnConditionalOp(D.AssignmentLoc, D.AssignmentLoc, in ActOnOMPIteratorExpr()
23722 Res = SemaRef.ActOnFinishFullExpr(Res.get(), /*DiscardedValue=*/false); in ActOnOMPIteratorExpr()
23730 auto *CounterVD = VarDecl::Create(Context, SemaRef.CurContext, in ActOnOMPIteratorExpr()
23736 SemaRef.BuildDeclRefExpr(CounterVD, CounterVD->getType(), VK_LValue, in ActOnOMPIteratorExpr()
23742 UpdateRes = SemaRef.CreateBuiltinBinOp( in ActOnOMPIteratorExpr()
23744 SemaRef.DefaultLvalueConversion(RefRes.get()).get(), St.get()); in ActOnOMPIteratorExpr()
23746 UpdateRes = SemaRef.DefaultLvalueConversion(RefRes.get()); in ActOnOMPIteratorExpr()
23752 UpdateRes = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Add, in ActOnOMPIteratorExpr()
23759 SemaRef.BuildDeclRefExpr(cast<VarDecl>(D.IteratorDecl), in ActOnOMPIteratorExpr()
23762 UpdateRes = SemaRef.CreateBuiltinBinOp(D.AssignmentLoc, BO_Assign, in ActOnOMPIteratorExpr()
23769 SemaRef.ActOnFinishFullExpr(UpdateRes.get(), /*DiscardedValue=*/true); in ActOnOMPIteratorExpr()
23774 ExprResult CounterUpdateRes = SemaRef.CreateBuiltinUnaryOp( in ActOnOMPIteratorExpr()
23780 CounterUpdateRes = SemaRef.ActOnFinishFullExpr(CounterUpdateRes.get(), in ActOnOMPIteratorExpr()
23836 if (!SemaRef.checkStringLiteralArgumentAttr(AL, 0, Str, &AttrStrLoc)) in handleOMPAssumeAttr()
23839 checkOMPAssumeAttr(SemaRef, AttrStrLoc, Str); in handleOMPAssumeAttr()