Lines Matching refs:SemaRef
120 Sema &SemaRef; member in __anon756b9f4d0111::DSAStackTy
132 explicit DSAStackTy(Sema &S) : Stack(1), SemaRef(S) {} in DSAStackTy()
618 static VarDecl *buildVarDecl(Sema &SemaRef, SourceLocation Loc, QualType Type, in buildVarDecl() argument
620 DeclContext *DC = SemaRef.CurContext; in buildVarDecl()
621 IdentifierInfo *II = &SemaRef.PP.getIdentifierTable().get(Name); in buildVarDecl()
622 TypeSourceInfo *TInfo = SemaRef.Context.getTrivialTypeSourceInfo(Type, Loc); in buildVarDecl()
624 VarDecl::Create(SemaRef.Context, DC, Loc, Loc, II, Type, TInfo, SC_None); in buildVarDecl()
654 SemaRef.getLangOpts().OpenMPUseTLS && in getTopDSA()
655 SemaRef.getASTContext().getTargetInfo().isTLSSupported())) || in getTopDSA()
658 addDSA(D, buildDeclRefExpr(SemaRef, VD, D->getType().getNonReferenceType(), in getTopDSA()
691 bool IsConstant = Type.isConstant(SemaRef.getASTContext()); in getTopDSA()
692 Type = SemaRef.getASTContext().getBaseElementType(Type); in getTopDSA()
698 SemaRef.getLangOpts().CPlusPlus ? Type->getAsCXXRecordDecl() : nullptr; in getTopDSA()
703 !(SemaRef.getLangOpts().CPlusPlus && RD && RD->hasDefinition() && in getTopDSA()
1111 Expr *NumIterations, Sema &SemaRef,
1118 Sema &SemaRef; member in __anon756b9f4d0911::VarDeclFilterCCC
1121 explicit VarDeclFilterCCC(Sema &S) : SemaRef(S) {} in VarDeclFilterCCC()
1126 SemaRef.isDeclInScope(ND, SemaRef.getCurLexicalContext(), in ValidateCandidate()
1127 SemaRef.getCurScope()); in ValidateCandidate()
1135 Sema &SemaRef; member in __anon756b9f4d0911::VarOrFuncDeclFilterCCC
1138 explicit VarOrFuncDeclFilterCCC(Sema &S) : SemaRef(S) {} in VarOrFuncDeclFilterCCC()
1142 return SemaRef.isDeclInScope(ND, SemaRef.getCurLexicalContext(), in ValidateCandidate()
1143 SemaRef.getCurScope()); in ValidateCandidate()
1289 Sema &SemaRef; member in __anon756b9f4d0a11::LocalVarRefChecker
1295 SemaRef.Diag(E->getLocStart(), in VisitDeclRefExpr()
1298 SemaRef.Diag(VD->getLocation(), diag::note_defined_here) in VisitDeclRefExpr()
1312 explicit LocalVarRefChecker(Sema &SemaRef) : SemaRef(SemaRef) {} in LocalVarRefChecker() argument
1397 static void ReportOriginalDSA(Sema &SemaRef, DSAStackTy *Stack, in ReportOriginalDSA() argument
1401 SemaRef.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_explicit_dsa) in ReportOriginalDSA()
1437 else if (D->getType().isConstant(SemaRef.getASTContext())) in ReportOriginalDSA()
1444 SemaRef.Diag(ReportLoc, diag::note_omp_predetermined_dsa) in ReportOriginalDSA()
1448 SemaRef.Diag(DVar.ImplicitDSALoc, diag::note_omp_implicit_dsa) in ReportOriginalDSA()
1456 Sema &SemaRef; member in __anon756b9f4d0c11::DSAAttrChecker
1502 SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task); in VisitDeclRefExpr()
1503 ReportOriginalDSA(SemaRef, Stack, VD, DVar); in VisitDeclRefExpr()
1542 SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task); in VisitMemberExpr()
1543 ReportOriginalDSA(SemaRef, Stack, FD, DVar); in VisitMemberExpr()
1579 DSAAttrChecker(DSAStackTy *S, Sema &SemaRef, CapturedStmt *CS) in DSAAttrChecker() argument
1580 : Stack(S), SemaRef(SemaRef), ErrorFound(false), CS(CS) {} in DSAAttrChecker()
1866 static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, in CheckNestingOfRegions() argument
3122 SemaRef.Diag(StartLoc, (CurrentRegion != OMPD_simd) in CheckNestingOfRegions()
3130 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_atomic); in CheckNestingOfRegions()
3140 SemaRef.Diag(StartLoc, diag::err_omp_orphaned_section_directive) in CheckNestingOfRegions()
3202 SemaRef.Diag(StartLoc, in CheckNestingOfRegions()
3206 SemaRef.Diag(PreviousCriticalLoc, in CheckNestingOfRegions()
3288 SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region) in CheckNestingOfRegions()
3903 Sema &SemaRef; member in __anon756b9f4d1411::OpenMPIterationSpaceChecker
3936 OpenMPIterationSpaceChecker(Sema &SemaRef, SourceLocation DefaultLoc) in OpenMPIterationSpaceChecker() argument
3937 : SemaRef(SemaRef), DefaultLoc(DefaultLoc), ConditionLoc(DefaultLoc) {} in OpenMPIterationSpaceChecker()
4061 SemaRef.PerformOpenMPImplicitIntegerConversion(StepLoc, NewStep); in SetStep()
4078 bool IsConstant = NewStep->isIntegerConstantExpr(Result, SemaRef.Context); in SetStep()
4088 SemaRef.Diag(NewStep->getExprLoc(), in SetStep()
4091 SemaRef.Diag(ConditionLoc, in SetStep()
4097 NewStep = SemaRef.CreateBuiltinUnaryOp(NewStep->getExprLoc(), UO_Minus, in SetStep()
4119 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_init); in CheckInit()
4151 SemaRef.Diag(S->getLocStart(), in CheckInit()
4175 if (Dependent() || SemaRef.CurContext->isDependentContext()) in CheckInit()
4178 SemaRef.Diag(S->getLocStart(), diag::err_omp_loop_not_canonical_init) in CheckInit()
4218 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_cond) << LCDecl; in CheckCond()
4258 if (Dependent() || SemaRef.CurContext->isDependentContext()) in CheckCond()
4260 SemaRef.Diag(CondLoc, diag::err_omp_loop_not_canonical_cond) in CheckCond()
4289 if (Dependent() || SemaRef.CurContext->isDependentContext()) in CheckIncRHS()
4291 SemaRef.Diag(RHS->getLocStart(), diag::err_omp_loop_not_canonical_incr) in CheckIncRHS()
4311 SemaRef.Diag(DefaultLoc, diag::err_omp_loop_not_canonical_incr) << LCDecl; in CheckInc()
4324 SemaRef.ActOnIntegerConstant(UO->getLocStart(), in CheckInc()
4347 SemaRef.ActOnIntegerConstant( in CheckInc()
4365 if (Dependent() || SemaRef.CurContext->isDependentContext()) in CheckInc()
4367 SemaRef.Diag(S->getLocStart(), diag::err_omp_loop_not_canonical_incr) in CheckInc()
4373 tryBuildCapture(Sema &SemaRef, Expr *Capture, in tryBuildCapture() argument
4375 if (SemaRef.CurContext->isDependentContext()) in tryBuildCapture()
4377 if (Capture->isEvaluatable(SemaRef.Context, Expr::SE_AllowSideEffects)) in tryBuildCapture()
4378 return SemaRef.PerformImplicitConversion( in tryBuildCapture()
4383 return buildCapture(SemaRef, Capture, I->second); in tryBuildCapture()
4385 ExprResult Res = buildCapture(SemaRef, Capture, Ref); in tryBuildCapture()
4397 SemaRef.getLangOpts().CPlusPlus) { in BuildNumIterations()
4401 Expr *Upper = tryBuildCapture(SemaRef, UBExpr, Captures).get(); in BuildNumIterations()
4402 Expr *Lower = tryBuildCapture(SemaRef, LBExpr, Captures).get(); in BuildNumIterations()
4406 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Sub, Upper, Lower); in BuildNumIterations()
4411 SemaRef.Diag(Upper->getLocStart(), diag::err_omp_loop_diff_cxx) in BuildNumIterations()
4422 Diff = SemaRef.BuildBinOp( in BuildNumIterations()
4424 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in BuildNumIterations()
4429 auto NewStep = tryBuildCapture(SemaRef, Step, Captures); in BuildNumIterations()
4432 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Add, Diff.get(), NewStep.get()); in BuildNumIterations()
4437 Diff = SemaRef.ActOnParenExpr(DefaultLoc, DefaultLoc, Diff.get()); in BuildNumIterations()
4442 Diff = SemaRef.BuildBinOp(S, DefaultLoc, BO_Div, Diff.get(), NewStep.get()); in BuildNumIterations()
4448 auto &C = SemaRef.Context; in BuildNumIterations()
4457 if (!SemaRef.Context.hasSameType(Diff.get()->getType(), Type)) { in BuildNumIterations()
4458 Diff = SemaRef.PerformImplicitConversion( in BuildNumIterations()
4469 SemaRef.Diag(DefaultLoc, diag::warn_omp_loop_64_bit_var) in BuildNumIterations()
4475 if (!SemaRef.Context.hasSameType(Diff.get()->getType(), NewType)) { in BuildNumIterations()
4476 Diff = SemaRef.PerformImplicitConversion(Diff.get(), NewType, in BuildNumIterations()
4491 bool Suppress = SemaRef.getDiagnostics().getSuppressAllDiagnostics(); in BuildPreCond()
4492 SemaRef.getDiagnostics().setSuppressAllDiagnostics(/*Val=*/true); in BuildPreCond()
4494 auto NewLB = tryBuildCapture(SemaRef, LB, Captures); in BuildPreCond()
4495 auto NewUB = tryBuildCapture(SemaRef, UB, Captures); in BuildPreCond()
4499 auto CondExpr = SemaRef.BuildBinOp( in BuildPreCond()
4504 if (!SemaRef.Context.hasSameUnqualifiedType(CondExpr.get()->getType(), in BuildPreCond()
4505 SemaRef.Context.BoolTy)) in BuildPreCond()
4506 CondExpr = SemaRef.PerformImplicitConversion( in BuildPreCond()
4507 CondExpr.get(), SemaRef.Context.BoolTy, /*Action=*/Sema::AA_Casting, in BuildPreCond()
4510 SemaRef.getDiagnostics().setSuppressAllDiagnostics(Suppress); in BuildPreCond()
4520 VD = SemaRef.IsOpenMPCapturedDecl(LCDecl); in BuildCounterVar()
4522 SemaRef, VD, VD->getType().getNonReferenceType(), DefaultLoc); in BuildCounterVar()
4530 return buildDeclRefExpr(SemaRef, VD, VD->getType().getNonReferenceType(), in BuildCounterVar()
4538 buildVarDecl(SemaRef, DefaultLoc, Type, LCDecl->getName(), in BuildPrivateCounterVar()
4542 return buildDeclRefExpr(SemaRef, PrivateVar, Type, DefaultLoc); in BuildPrivateCounterVar()
4610 OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, in CheckOpenMPIterationSpace() argument
4620 SemaRef.Diag(S->getLocStart(), diag::err_omp_not_for) in CheckOpenMPIterationSpace()
4626 SemaRef.Diag(DSA.getConstructLoc(), in CheckOpenMPIterationSpace()
4631 SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), in CheckOpenMPIterationSpace()
4635 SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), in CheckOpenMPIterationSpace()
4643 OpenMPIterationSpaceChecker ISC(SemaRef, For->getForLoc()); in CheckOpenMPIterationSpace()
4664 !(SemaRef.getLangOpts().CPlusPlus && VarType->isOverloadableType())) { in CheckOpenMPIterationSpace()
4665 SemaRef.Diag(Init->getLocStart(), diag::err_omp_loop_variable_type) in CheckOpenMPIterationSpace()
4666 << SemaRef.getLangOpts().CPlusPlus; in CheckOpenMPIterationSpace()
4703 SemaRef.Diag(Init->getLocStart(), diag::err_omp_loop_var_dsa) in CheckOpenMPIterationSpace()
4708 ReportOriginalDSA(SemaRef, &DSA, LCDecl, DVar, /*IsLoopIterVar=*/true); in CheckOpenMPIterationSpace()
4731 if (ISC.Dependent() || SemaRef.CurContext->isDependentContext() || HasErrors) in CheckOpenMPIterationSpace()
4763 BuildCounterInit(Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, in BuildCounterInit() argument
4767 auto NewStart = tryBuildCapture(SemaRef, Start.get(), Captures); in BuildCounterInit()
4770 if (!SemaRef.Context.hasSameType(NewStart.get()->getType(), in BuildCounterInit()
4772 NewStart = SemaRef.PerformImplicitConversion( in BuildCounterInit()
4780 SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), NewStart.get()); in BuildCounterInit()
4786 BuildCounterUpdate(Sema &SemaRef, Scope *S, SourceLocation Loc, in BuildCounterUpdate() argument
4791 Iter = SemaRef.ActOnParenExpr(Loc, Loc, Iter.get()); in BuildCounterUpdate()
4798 NewStep = tryBuildCapture(SemaRef, Step.get(), *Captures); in BuildCounterUpdate()
4802 SemaRef.BuildBinOp(S, Loc, BO_Mul, Iter.get(), NewStep.get()); in BuildCounterUpdate()
4810 NewStart = tryBuildCapture(SemaRef, Start.get(), *Captures); in BuildCounterUpdate()
4820 bool Suppress = SemaRef.getDiagnostics().getSuppressAllDiagnostics(); in BuildCounterUpdate()
4821 SemaRef.getDiagnostics().setSuppressAllDiagnostics(/*Val=*/true); in BuildCounterUpdate()
4823 SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), NewStart.get()); in BuildCounterUpdate()
4826 SemaRef.BuildBinOp(S, Loc, Subtract ? BO_SubAssign : BO_AddAssign, in BuildCounterUpdate()
4829 Update = SemaRef.CreateBuiltinBinOp(Loc, BO_Comma, Update.get(), in BuildCounterUpdate()
4833 SemaRef.getDiagnostics().setSuppressAllDiagnostics(Suppress); in BuildCounterUpdate()
4838 Update = SemaRef.BuildBinOp(S, Loc, Subtract ? BO_Sub : BO_Add, in BuildCounterUpdate()
4843 if (!SemaRef.Context.hasSameType(Update.get()->getType(), in BuildCounterUpdate()
4845 Update = SemaRef.PerformImplicitConversion( in BuildCounterUpdate()
4851 Update = SemaRef.BuildBinOp(S, Loc, BO_Assign, VarRef.get(), Update.get()); in BuildCounterUpdate()
4859 Sema &SemaRef) { in WidenIterationCount() argument
4862 auto &C = SemaRef.Context; in WidenIterationCount()
4869 return SemaRef.PerformImplicitConversion(E, NewType, Sema::AA_Converting, in WidenIterationCount()
4875 static bool FitsInto(unsigned Bits, bool Signed, Expr *E, Sema &SemaRef) { in FitsInto() argument
4879 if (E->isIntegerConstantExpr(Result, SemaRef.Context)) in FitsInto()
4932 Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, in CheckOpenMPLoop() argument
4940 if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) in CheckOpenMPLoop()
4946 if (OrderedLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) { in CheckOpenMPLoop()
4948 SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), in CheckOpenMPLoop()
4951 SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), in CheckOpenMPLoop()
4965 if (CheckOpenMPIterationSpace(DKind, CurStmt, SemaRef, DSA, Cnt, in CheckOpenMPLoop()
4980 if (SemaRef.CurContext->isDependentContext()) in CheckOpenMPLoop()
5017 32 /* Bits */, SemaRef.PerformImplicitConversion( in CheckOpenMPLoop()
5021 SemaRef); in CheckOpenMPLoop()
5023 64 /* Bits */, SemaRef.PerformImplicitConversion( in CheckOpenMPLoop()
5027 SemaRef); in CheckOpenMPLoop()
5032 auto &C = SemaRef.Context; in CheckOpenMPLoop()
5038 PreCond = SemaRef.BuildBinOp(CurScope, SourceLocation(), BO_LAnd, in CheckOpenMPLoop()
5044 LastIteration32 = SemaRef.BuildBinOp( in CheckOpenMPLoop()
5046 SemaRef.PerformImplicitConversion(N->IgnoreImpCasts(), N->getType(), in CheckOpenMPLoop()
5051 LastIteration64 = SemaRef.BuildBinOp( in CheckOpenMPLoop()
5053 SemaRef.PerformImplicitConversion(N->IgnoreImpCasts(), N->getType(), in CheckOpenMPLoop()
5067 LastIteration64.get(), SemaRef))) in CheckOpenMPLoop()
5074 SemaRef.Context.getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/0); in CheckOpenMPLoop()
5076 SemaRef.Context.getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/1); in CheckOpenMPLoop()
5085 LastIteration = SemaRef.BuildBinOp( in CheckOpenMPLoop()
5087 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in CheckOpenMPLoop()
5096 LastIteration.get()->isIntegerConstantExpr(Result, SemaRef.Context); in CheckOpenMPLoop()
5100 tryBuildCapture(SemaRef, LastIteration.get(), Captures); in CheckOpenMPLoop()
5104 NumIterations = SemaRef.BuildBinOp( in CheckOpenMPLoop()
5106 SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get()); in CheckOpenMPLoop()
5118 VarDecl *LBDecl = buildVarDecl(SemaRef, InitLoc, VType, ".omp.lb"); in CheckOpenMPLoop()
5119 LB = buildDeclRefExpr(SemaRef, LBDecl, VType, InitLoc); in CheckOpenMPLoop()
5120 SemaRef.AddInitializerToDecl( in CheckOpenMPLoop()
5121 LBDecl, SemaRef.ActOnIntegerConstant(InitLoc, 0).get(), in CheckOpenMPLoop()
5125 VarDecl *UBDecl = buildVarDecl(SemaRef, InitLoc, VType, ".omp.ub"); in CheckOpenMPLoop()
5126 UB = buildDeclRefExpr(SemaRef, UBDecl, VType, InitLoc); in CheckOpenMPLoop()
5127 SemaRef.AddInitializerToDecl(UBDecl, LastIteration.get(), in CheckOpenMPLoop()
5133 QualType Int32Ty = SemaRef.Context.getIntTypeForBitwidth(32, true); in CheckOpenMPLoop()
5134 VarDecl *ILDecl = buildVarDecl(SemaRef, InitLoc, Int32Ty, ".omp.is_last"); in CheckOpenMPLoop()
5135 IL = buildDeclRefExpr(SemaRef, ILDecl, Int32Ty, InitLoc); in CheckOpenMPLoop()
5136 SemaRef.AddInitializerToDecl( in CheckOpenMPLoop()
5137 ILDecl, SemaRef.ActOnIntegerConstant(InitLoc, 0).get(), in CheckOpenMPLoop()
5142 buildVarDecl(SemaRef, InitLoc, StrideVType, ".omp.stride"); in CheckOpenMPLoop()
5143 ST = buildDeclRefExpr(SemaRef, STDecl, StrideVType, InitLoc); in CheckOpenMPLoop()
5144 SemaRef.AddInitializerToDecl( in CheckOpenMPLoop()
5145 STDecl, SemaRef.ActOnIntegerConstant(InitLoc, 1).get(), in CheckOpenMPLoop()
5150 ExprResult IsUBGreater = SemaRef.BuildBinOp(CurScope, InitLoc, BO_GT, in CheckOpenMPLoop()
5152 ExprResult CondOp = SemaRef.ActOnConditionalOp( in CheckOpenMPLoop()
5154 EUB = SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, UB.get(), in CheckOpenMPLoop()
5156 EUB = SemaRef.ActOnFinishFullExpr(EUB.get()); in CheckOpenMPLoop()
5178 buildDeclRefExpr(SemaRef, PrevLBDecl, PrevLBDecl->getType(), InitLoc); in CheckOpenMPLoop()
5180 buildDeclRefExpr(SemaRef, PrevUBDecl, PrevUBDecl->getType(), InitLoc); in CheckOpenMPLoop()
5188 VarDecl *IVDecl = buildVarDecl(SemaRef, InitLoc, RealVType, ".omp.iv"); in CheckOpenMPLoop()
5189 IV = buildDeclRefExpr(SemaRef, IVDecl, RealVType, InitLoc); in CheckOpenMPLoop()
5194 : SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get(); in CheckOpenMPLoop()
5195 Init = SemaRef.BuildBinOp(CurScope, InitLoc, BO_Assign, IV.get(), RHS); in CheckOpenMPLoop()
5196 Init = SemaRef.ActOnFinishFullExpr(Init.get()); in CheckOpenMPLoop()
5204 ? SemaRef.BuildBinOp(CurScope, CondLoc, BO_LE, IV.get(), UB.get()) in CheckOpenMPLoop()
5205 : SemaRef.BuildBinOp(CurScope, CondLoc, BO_LT, IV.get(), in CheckOpenMPLoop()
5211 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, IV.get(), in CheckOpenMPLoop()
5212 SemaRef.ActOnIntegerConstant(IncLoc, 1).get()); in CheckOpenMPLoop()
5215 Inc = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, IV.get(), Inc.get()); in CheckOpenMPLoop()
5216 Inc = SemaRef.ActOnFinishFullExpr(Inc.get()); in CheckOpenMPLoop()
5226 NextLB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, LB.get(), ST.get()); in CheckOpenMPLoop()
5231 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, LB.get(), NextLB.get()); in CheckOpenMPLoop()
5232 NextLB = SemaRef.ActOnFinishFullExpr(NextLB.get()); in CheckOpenMPLoop()
5236 NextUB = SemaRef.BuildBinOp(CurScope, IncLoc, BO_Add, UB.get(), ST.get()); in CheckOpenMPLoop()
5241 SemaRef.BuildBinOp(CurScope, IncLoc, BO_Assign, UB.get(), NextUB.get()); in CheckOpenMPLoop()
5242 NextUB = SemaRef.ActOnFinishFullExpr(NextUB.get()); in CheckOpenMPLoop()
5265 SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Div, IV.get(), Div.get()); in CheckOpenMPLoop()
5273 Iter = SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Rem, Iter.get(), in CheckOpenMPLoop()
5282 auto *CounterVar = buildDeclRefExpr(SemaRef, VD, IS.CounterVar->getType(), in CheckOpenMPLoop()
5285 ExprResult Init = BuildCounterInit(SemaRef, CurScope, UpdLoc, CounterVar, in CheckOpenMPLoop()
5292 SemaRef, CurScope, UpdLoc, CounterVar, IS.CounterInit, Iter, in CheckOpenMPLoop()
5301 SemaRef, CurScope, UpdLoc, CounterVar, IS.CounterInit, in CheckOpenMPLoop()
5313 Div = SemaRef.BuildBinOp(CurScope, UpdLoc, BO_Mul, Div.get(), in CheckOpenMPLoop()
5318 Div = tryBuildCapture(SemaRef, Div.get(), Captures); in CheckOpenMPLoop()
5346 SemaRef.ActOnFinishFullExpr(CalcLastIteration.get()).get(); in CheckOpenMPLoop()
5362 Expr *CounterVal = SemaRef.DefaultLvalueConversion(IV.get()).get(); in CheckOpenMPLoop()
5384 SemaRef in CheckOpenMPLoop()
5390 SemaRef in CheckOpenMPLoop()
5398 SemaRef.BuildBinOp(CurScope, I->first->getExprLoc(), BOK, in CheckOpenMPLoop()
6054 Sema &SemaRef; member in __anon756b9f4d1611::OpenMPAtomicUpdateChecker
6075 OpenMPAtomicUpdateChecker(Sema &SemaRef) in OpenMPAtomicUpdateChecker() argument
6076 : SemaRef(SemaRef), X(nullptr), E(nullptr), UpdateExpr(nullptr), in OpenMPAtomicUpdateChecker()
6128 X->IgnoreParenImpCasts()->Profile(XId, SemaRef.getASTContext(), in checkBinaryOperation()
6130 LHS->IgnoreParenImpCasts()->Profile(LHSId, SemaRef.getASTContext(), in checkBinaryOperation()
6132 RHS->IgnoreParenImpCasts()->Profile(RHSId, SemaRef.getASTContext(), in checkBinaryOperation()
6167 SemaRef.Diag(ErrorLoc, DiagId) << ErrorRange; in checkBinaryOperation()
6168 SemaRef.Diag(NoteLoc, NoteId) << ErrorFound << NoteRange; in checkBinaryOperation()
6170 } else if (SemaRef.CurContext->isDependentContext()) in checkBinaryOperation()
6214 E = SemaRef.ActOnIntegerConstant(OpLoc, /*uint64_t Val=*/1).get(); in checkStatement()
6239 SemaRef.Diag(ErrorLoc, DiagId) << ErrorRange; in checkStatement()
6240 SemaRef.Diag(NoteLoc, NoteId) << ErrorFound << NoteRange; in checkStatement()
6242 } else if (SemaRef.CurContext->isDependentContext()) in checkStatement()
6248 auto *OVEX = new (SemaRef.getASTContext()) in checkStatement()
6250 auto *OVEExpr = new (SemaRef.getASTContext()) in checkStatement()
6253 SemaRef.CreateBuiltinBinOp(OpLoc, Op, IsXLHSInRHSPart ? OVEX : OVEExpr, in checkStatement()
6257 Update = SemaRef.PerformImplicitConversion(Update.get(), X->getType(), in checkStatement()
7415 static bool IsNonNegativeIntegerValue(Expr *&ValExpr, Sema &SemaRef, in IsNonNegativeIntegerValue() argument
7422 SemaRef.PerformOpenMPImplicitIntegerConversion(Loc, ValExpr); in IsNonNegativeIntegerValue()
7429 if (ValExpr->isIntegerConstantExpr(Result, SemaRef.Context) && in IsNonNegativeIntegerValue()
7433 SemaRef.Diag(Loc, diag::err_omp_negative_expression_in_clause) in IsNonNegativeIntegerValue()
8871 TransformExprToCaptures(Sema &SemaRef, ValueDecl *FieldDecl) in TransformExprToCaptures() argument
8872 : BaseTransform(SemaRef), Field(FieldDecl), CapturedExpr(nullptr) {} in TransformExprToCaptures()
8877 CapturedExpr = buildCapture(SemaRef, Field, E, /*WithInit=*/false); in TransformMemberExpr()
8899 buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, in buildDeclareReductionRef() argument
8907 LookupResult Lookup(SemaRef, ReductionId, Sema::LookupOMPReductionName); in buildDeclareReductionRef()
8909 while (S && SemaRef.LookupParsedName(Lookup, S, &ReductionIdScopeSpec)) { in buildDeclareReductionRef()
8947 SemaRef.Context, /*NamingClass=*/nullptr, in buildDeclareReductionRef()
8948 ReductionIdScopeSpec.getWithLocInContext(SemaRef.Context), ReductionId, in buildDeclareReductionRef()
8952 Lookups, [&SemaRef, Ty](ValueDecl *D) -> ValueDecl * { in buildDeclareReductionRef()
8954 SemaRef.Context.hasSameType(D->getType(), Ty)) in buildDeclareReductionRef()
8958 return SemaRef.BuildDeclRefExpr(VD, Ty, VK_LValue, Loc); in buildDeclareReductionRef()
8960 Lookups, [&SemaRef, Ty, Loc](ValueDecl *D) -> ValueDecl * { in buildDeclareReductionRef()
8962 SemaRef.IsDerivedFrom(Loc, Ty, D->getType()) && in buildDeclareReductionRef()
8969 if (SemaRef.IsDerivedFrom(Loc, Ty, VD->getType(), Paths)) { in buildDeclareReductionRef()
8970 if (!Paths.isAmbiguous(SemaRef.Context.getCanonicalType( in buildDeclareReductionRef()
8972 if (SemaRef.CheckBaseClassAccess(Loc, VD->getType(), Ty, Paths.front(), in buildDeclareReductionRef()
8975 SemaRef.BuildBasePathArray(Paths, BasePath); in buildDeclareReductionRef()
8976 return SemaRef.BuildDeclRefExpr(VD, Ty, VK_LValue, Loc); in buildDeclareReductionRef()
8982 SemaRef.Diag(Loc, diag::err_omp_not_resolved_reduction_identifier) << Range; in buildDeclareReductionRef()
9739 Expr *NumIterations, Sema &SemaRef, in FinishOpenMPLinearClause() argument
9749 Step = SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get(); in FinishOpenMPLinearClause()
9761 auto Res = getPrivateItem(SemaRef, SimpleRefExpr, ELoc, ERange, in FinishOpenMPLinearClause()
9784 buildDeclRefExpr(SemaRef, cast<VarDecl>(DE->getDecl()), in FinishOpenMPLinearClause()
9792 BuildCounterUpdate(SemaRef, S, RefExpr->getExprLoc(), *CurPrivate, in FinishOpenMPLinearClause()
9796 Update = SemaRef.ActOnFinishFullExpr(Update.get(), DE->getLocStart(), in FinishOpenMPLinearClause()
9802 Final = BuildCounterUpdate(SemaRef, S, RefExpr->getExprLoc(), CapturedRef, in FinishOpenMPLinearClause()
9807 Final = SemaRef.ActOnFinishFullExpr(Final.get(), DE->getLocStart(), in FinishOpenMPLinearClause()
10291 static bool IsCXXRecordForMappable(Sema &SemaRef, SourceLocation Loc, in IsCXXRecordForMappable() argument
10299 auto QTy = SemaRef.Context.getRecordType(RD); in IsCXXRecordForMappable()
10301 SemaRef.Diag(Loc, diag::err_omp_not_mappable_type) << QTy; in IsCXXRecordForMappable()
10302 SemaRef.Diag(RD->getLocation(), diag::note_omp_polymorphic_in_target); in IsCXXRecordForMappable()
10311 SemaRef.Diag(Loc, diag::err_omp_not_mappable_type) << QTy; in IsCXXRecordForMappable()
10312 SemaRef.Diag(MD->getLocation(), in IsCXXRecordForMappable()
10318 SemaRef.Diag(Loc, diag::err_omp_not_mappable_type) << QTy; in IsCXXRecordForMappable()
10319 SemaRef.Diag(VD->getLocation(), in IsCXXRecordForMappable()
10328 if (!IsCXXRecordForMappable(SemaRef, I.getLocStart(), Stack, in IsCXXRecordForMappable()
10335 static bool CheckTypeMappable(SourceLocation SL, SourceRange SR, Sema &SemaRef, in CheckTypeMappable() argument
10339 SemaRef.Diag(SL, diag::err_incomplete_type) << QTy << SR; in CheckTypeMappable()
10343 !IsCXXRecordForMappable(SemaRef, SL, Stack, RD)) in CheckTypeMappable()
10352 static bool CheckArrayExpressionDoesNotReferToWholeSize(Sema &SemaRef, in CheckArrayExpressionDoesNotReferToWholeSize() argument
10375 if (!LowerBound->EvaluateAsInt(ConstLowerBound, SemaRef.getASTContext())) in CheckArrayExpressionDoesNotReferToWholeSize()
10397 if (!Length->EvaluateAsInt(ConstLength, SemaRef.getASTContext())) in CheckArrayExpressionDoesNotReferToWholeSize()
10406 static bool CheckArrayExpressionDoesNotReferToUnitySize(Sema &SemaRef, in CheckArrayExpressionDoesNotReferToUnitySize() argument
10431 if (!Length->EvaluateAsInt(ConstLength, SemaRef.getASTContext())) in CheckArrayExpressionDoesNotReferToUnitySize()
10442 Sema &SemaRef, Expr *E, in CheckMapClauseExpressionBase() argument
10519 SemaRef.Diag(ELoc, diag::err_omp_expected_access_to_data_field) in CheckMapClauseExpressionBase()
10530 SemaRef.Diag(ELoc, diag::err_omp_bit_fields_forbidden_in_clause) in CheckMapClauseExpressionBase()
10546 SemaRef.Diag(ELoc, diag::err_omp_union_type_not_allowed) in CheckMapClauseExpressionBase()
10571 SemaRef.Diag(ELoc, diag::err_omp_expected_base_var_name) in CheckMapClauseExpressionBase()
10579 if (CheckArrayExpressionDoesNotReferToWholeSize(SemaRef, CurE, in CheckMapClauseExpressionBase()
10604 SemaRef.Diag(ELoc, diag::err_omp_expected_base_var_name) in CheckMapClauseExpressionBase()
10610 CheckArrayExpressionDoesNotReferToWholeSize(SemaRef, CurE, CurType); in CheckMapClauseExpressionBase()
10612 CheckArrayExpressionDoesNotReferToUnitySize(SemaRef, CurE, CurType); in CheckMapClauseExpressionBase()
10626 SemaRef.Diag( in CheckMapClauseExpressionBase()
10639 SemaRef.Diag(ELoc, in CheckMapClauseExpressionBase()
10651 Sema &SemaRef, DSAStackTy *DSAS, ValueDecl *VD, Expr *E, in CheckMapConflicts() argument
10702 SemaRef.Diag(CI->getAssociatedExpression()->getExprLoc(), in CheckMapConflicts()
10705 SemaRef.Diag(SI->getAssociatedExpression()->getExprLoc(), in CheckMapConflicts()
10730 SemaRef.Diag(ELoc, diag::err_omp_map_shared_storage) << ERange; in CheckMapConflicts()
10733 SemaRef.Diag(ELoc, diag::err_omp_once_referenced_in_target_update) in CheckMapConflicts()
10736 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in CheckMapConflicts()
10770 SemaRef.Diag( in CheckMapConflicts()
10776 SemaRef.Diag(DerivedLoc, diag::err_omp_same_pointer_derreferenced) in CheckMapConflicts()
10779 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in CheckMapConflicts()
10791 SemaRef.Diag(ELoc, diag::err_omp_map_shared_storage) << ERange; in CheckMapConflicts()
10794 SemaRef.Diag(ELoc, diag::err_omp_once_referenced_in_target_update) in CheckMapConflicts()
10797 SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) in CheckMapConflicts()
10830 SemaRef.Diag(ELoc, in CheckMapConflicts()
10833 SemaRef.Diag(EnclosingExpr->getExprLoc(), diag::note_used_here) in CheckMapConflicts()
10869 checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, in checkMappableExpressionList() argument
10902 SemaRef.Diag(ELoc, in checkMappableExpressionList()
10914 CheckMapClauseExpressionBase(SemaRef, SimpleExpr, CurComponents, CKind); in checkMappableExpressionList()
10942 SemaRef.Diag(ELoc, diag::err_omp_threadprivate_in_clause) in checkMappableExpressionList()
10944 ReportOriginalDSA(SemaRef, DSAS, VD, DVar); in checkMappableExpressionList()
10956 if (CheckMapConflicts(SemaRef, DSAS, CurDeclaration, SimpleExpr, in checkMappableExpressionList()
10960 CheckMapConflicts(SemaRef, DSAS, CurDeclaration, SimpleExpr, in checkMappableExpressionList()
10974 if (!CheckTypeMappable(VE->getExprLoc(), VE->getSourceRange(), SemaRef, in checkMappableExpressionList()
10986 SemaRef.Diag(StartLoc, diag::err_omp_invalid_map_type_for_directive) in checkMappableExpressionList()
11000 SemaRef.Diag(StartLoc, diag::err_omp_invalid_map_type_for_directive) in checkMappableExpressionList()
11013 SemaRef.Diag(ELoc, diag::err_omp_variable_in_map_and_dsa) in checkMappableExpressionList()
11016 ReportOriginalDSA(SemaRef, DSAS, CurDeclaration, DVar); in checkMappableExpressionList()
11537 Sema &SemaRef, Decl *D) { in checkDeclInTargetContext() argument
11550 SemaRef.Context, OMPDeclareTargetDeclAttr::MT_To); in checkDeclInTargetContext()
11552 if (ASTMutationListener *ML = SemaRef.Context.getASTMutationListener()) in checkDeclInTargetContext()
11567 SemaRef.Context, OMPDeclareTargetDeclAttr::MT_To); in checkDeclInTargetContext()
11569 if (ASTMutationListener *ML = SemaRef.Context.getASTMutationListener()) in checkDeclInTargetContext()
11580 SemaRef.Diag(LD->getLocation(), diag::warn_omp_not_in_target_context); in checkDeclInTargetContext()
11581 SemaRef.Diag(SL, diag::note_used_here) << SR; in checkDeclInTargetContext()
11594 SemaRef.Diag(LD->getLocation(), diag::warn_omp_not_in_target_context); in checkDeclInTargetContext()
11595 SemaRef.Diag(SL, diag::note_used_here) << SR; in checkDeclInTargetContext()
11599 SemaRef.Context, OMPDeclareTargetDeclAttr::MT_To); in checkDeclInTargetContext()
11601 if (ASTMutationListener *ML = SemaRef.Context.getASTMutationListener()) in checkDeclInTargetContext()
11607 Sema &SemaRef, DSAStackTy *Stack, in checkValueDeclInTarget() argument
11611 if (!CheckTypeMappable(SL, SR, SemaRef, Stack, VD->getType())) in checkValueDeclInTarget()