Lines Matching defs:SemaRef

157   DeclContext *LexicalParent = SemaRef.getCurLexicalContext();
169 SemaRef.PushOnScopeChains(Result, BufferScope);
170 SemaRef.PushDeclContext(BufferScope, Result);
504 validatePackoffset(SemaRef, BufDecl);
507 createHostLayoutStructForBuffer(SemaRef, BufDecl);
509 SemaRef.PopDeclContext();
736 Sema &SemaRef, ExprResult &LHS, ExprResult &RHS, QualType LHSType,
743 SemaRef.getASTContext().getFloatingTypeOrder(LElTy, RElTy) > 0)
744 return castElement<CK_FloatingCast>(SemaRef, RHS, LHSType);
746 return castElement<CK_FloatingCast>(SemaRef, LHS, RHSType);
750 return castElement<CK_IntegralToFloating>(SemaRef, RHS, LHSType);
754 return castElement<clang::CK_FloatingToIntegral>(SemaRef, RHS, LHSType);
756 return castElement<CK_IntegralToFloating>(SemaRef, LHS, RHSType);
760 Sema &SemaRef, ExprResult &LHS, ExprResult &RHS, QualType LHSType,
763 int IntOrder = SemaRef.Context.getIntegerTypeOrder(LElTy, RElTy);
766 auto &Ctx = SemaRef.getASTContext();
771 return castElement<CK_IntegralCast>(SemaRef, RHS, LHSType);
773 return castElement<CK_IntegralCast>(SemaRef, LHS, RHSType);
780 return castElement<CK_IntegralCast>(SemaRef, RHS, LHSType);
781 return castElement<CK_IntegralCast>(SemaRef, LHS, RHSType);
789 return castElement<CK_IntegralCast>(SemaRef, RHS, LHSType);
790 return castElement<CK_IntegralCast>(SemaRef, LHS, RHSType);
801 return castElement<CK_IntegralCast>(SemaRef, RHS, LHSType);
807 (void)castElement<CK_IntegralCast>(SemaRef, RHS, NewTy);
809 return castElement<CK_IntegralCast>(SemaRef, LHS, NewTy);
836 RHS = SemaRef.ImpCastExprToType(RHS.get(), RElTy, CK_HLSLVectorTruncation);
840 RHS = SemaRef.ImpCastExprToType(RHS.get(), LHSType,
864 castVector<CK_HLSLVectorTruncation>(SemaRef, RHS, RHSType, EndSz);
866 castVector<CK_HLSLVectorTruncation>(SemaRef, LHS, LHSType, EndSz);
869 castVector<CK_VectorSplat>(SemaRef, RHS, RHSType, EndSz);
871 castVector<CK_VectorSplat>(SemaRef, LHS, LHSType, EndSz);
882 return handleFloatVectorBinOpConversion(SemaRef, LHS, RHS, LHSType, RHSType,
887 return handleIntegerVectorBinOpConversion(SemaRef, LHS, RHS, LHSType, RHSType,
897 PrintingPolicy PP(SemaRef.getLangOpts());
905 SemaRef.Diag(LHS->getBeginLoc(), diag::note_function_suggestion)
923 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(0), X))
932 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(1), Y))
941 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(2), Z))
944 SemaRef.Diag(AL.getArgAsExpr(2)->getExprLoc(),
972 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(0), Min))
977 !SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(1), Max))
982 !SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(2), Preferred))
1075 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(0), SubComponent))
1078 if (!SemaRef.checkUInt32Argument(AL, AL.getArgAsExpr(1), Component))
1119 if (!SemaRef.checkStringLiteralArgumentAttr(AL, 0, Str, &ArgLoc))
1229 if (!AL.checkExactlyNumArgs(SemaRef, AL.getMinArgs()))
1271 QualType QT = SemaRef.GetTypeFromParser(AL.getTypeArg(), &TSI);
1273 if (SemaRef.RequireCompleteType(TSI->getTypeLoc().getBeginLoc(), QT,
1295 if (CreateHLSLAttributedResourceType(SemaRef, CurrentType,
1485 if (SemaRef.RequireCompleteType(TheDecl->getBeginLoc(),
1553 if (!DiagnoseHLSLRegisterAttribute(SemaRef, ArgLoc, TheDecl, RegType,
1588 Sema &SemaRef;
1681 DiagnoseHLSLAvailability(Sema &SemaRef)
1682 : SemaRef(SemaRef),
1831 SemaRef.getASTContext().getTargetInfo().getPlatformName();
1861 if (SemaRef.getLangOpts().HLSLStrictAvailability)
1881 SemaRef.Context.getTargetInfo().getPlatformMinVersion();
1887 const TargetInfo &TI = SemaRef.getASTContext().getTargetInfo();
1899 SemaRef.Diag(Range.getBegin(), diag::warn_hlsl_availability)
1903 SemaRef.Diag(Range.getBegin(), diag::warn_hlsl_availability_unavailable)
1907 SemaRef.Diag(D->getLocation(), diag::note_partial_availability_specified_here)
1909 << SemaRef.Context.getTargetInfo().getPlatformMinVersion().getAsString()
1920 const TargetInfo &TI = SemaRef.getASTContext().getTargetInfo();
1921 if (SemaRef.getLangOpts().HLSLStrictAvailability &&
1925 DiagnoseHLSLAvailability(SemaRef).RunOnTranslationUnit(TU);
2226 if (SemaRef.checkArgCount(TheCall, 2) ||
2227 CheckResourceHandle(&SemaRef, TheCall, 0) ||
2228 CheckArgTypeMatches(&SemaRef, TheCall->getArg(1),
2229 SemaRef.getASTContext().UnsignedIntTy))
2243 if (SemaRef.checkArgCount(TheCall, 1))
2248 if (SemaRef.checkArgCount(TheCall, 2))
2250 if (CheckUnsignedIntRepresentation(&SemaRef, TheCall))
2253 SetElementTypeAsReturnType(&SemaRef, TheCall, getASTContext().DoubleTy);
2257 if (SemaRef.checkArgCount(TheCall, 3))
2259 if (CheckVectorElementCallArgs(&SemaRef, TheCall))
2261 if (SemaRef.BuiltinElementwiseTernaryMath(
2268 if (SemaRef.checkArgCount(TheCall, 2))
2270 if (CheckVectorElementCallArgs(&SemaRef, TheCall))
2272 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2282 SemaRef.Diag(TheCall->getBeginLoc(),
2290 SemaRef.Diag(TheCall->getBeginLoc(),
2303 if (SemaRef.checkArgCount(TheCall, 2))
2305 if (CheckVectorElementCallArgs(&SemaRef, TheCall))
2307 if (SemaRef.BuiltinVectorToScalarMath(TheCall))
2309 if (CheckNoDoubleVectors(&SemaRef, TheCall))
2315 if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall))
2322 QualType ResTy = SemaRef.Context.UnsignedIntTy;
2326 ResTy = SemaRef.Context.getVectorType(ResTy, VecTy->getNumElements(),
2340 if (SemaRef.checkArgCount(TheCall, 3))
2342 if (CheckScalarOrVector(&SemaRef, TheCall, getASTContext().BoolTy, 0))
2345 if (ArgTy->isBooleanType() && CheckBoolSelect(&SemaRef, TheCall))
2349 CheckVectorSelect(&SemaRef, TheCall))
2355 if (CheckAllArgsHaveFloatRepresentation(&SemaRef, TheCall))
2357 if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall))
2365 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2367 if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall))
2372 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2374 if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall))
2376 SetElementTypeAsReturnType(&SemaRef, TheCall, getASTContext().BoolTy);
2380 if (SemaRef.checkArgCount(TheCall, 3))
2382 if (CheckVectorElementCallArgs(&SemaRef, TheCall))
2384 if (SemaRef.BuiltinElementwiseTernaryMath(TheCall))
2386 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2391 if (SemaRef.checkArgCount(TheCall, 3))
2393 if (CheckVectorElementCallArgs(&SemaRef, TheCall))
2395 if (SemaRef.BuiltinElementwiseTernaryMath(
2402 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2404 if (SemaRef.checkArgCount(TheCall, 1))
2414 if (CheckFloatingOrIntRepresentation(&SemaRef, TheCall))
2416 if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall))
2418 SetElementTypeAsReturnType(&SemaRef, TheCall, getASTContext().IntTy);
2422 if (SemaRef.checkArgCount(TheCall, 2))
2424 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2435 if (SemaRef.checkArgCount(TheCall, 1))
2439 if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
2441 if (CheckWaveActive(&SemaRef, TheCall))
2451 if (CheckUnsignedIntRepresentation(&SemaRef, TheCall))
2456 if (SemaRef.checkArgCount(TheCall, 2))
2463 SemaRef.Diag(TheCall->getArg(1)->getBeginLoc(),
2465 << ArgTyIndex << SemaRef.Context.UnsignedIntTy << 1 << 0 << 0;
2470 if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
2479 if (SemaRef.checkArgCount(TheCall, 0))
2484 if (SemaRef.checkArgCount(TheCall, 3))
2487 if (CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.DoubleTy, 0) ||
2488 CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy,
2490 CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy,
2494 if (CheckModifiableLValue(&SemaRef, TheCall, 1) ||
2495 CheckModifiableLValue(&SemaRef, TheCall, 2))
2500 if (SemaRef.checkArgCount(TheCall, 1))
2503 if (CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.FloatTy, 0))
2529 if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
2538 if (SemaRef.checkArgCount(TheCall, 2) ||
2539 CheckResourceHandle(&SemaRef, TheCall, 0, checkResTy) ||
2540 CheckArgTypeMatches(&SemaRef, TheCall->getArg(1),
2541 SemaRef.getASTContext().IntTy))
2545 OffsetExpr->getIntegerConstantExpr(SemaRef.getASTContext());
2547 SemaRef.Diag(TheCall->getArg(1)->getBeginLoc(),
2631 if (SemaRef.Context.getTypeSize(QT) / 8 > 16)
2646 if (SemaRef.Context.getTypeSize(QT) / 8 > 16)
2662 if (SemaRef.getASTContext().hasSameType(T1, T2))
2673 return SemaRef.IsLayoutCompatible(LHS, RHS);
2698 SemaRef.Diag(NewParam->getLocation(),
2701 SemaRef.Diag(OldParam->getLocation(), diag::note_previous_declaration_as)
2718 SemaRef.Diag(Arg->getBeginLoc(), diag::error_hlsl_inout_lvalue)
2723 ASTContext &Ctx = SemaRef.getASTContext();
2731 SemaRef.Diag(Arg->getBeginLoc(), diag::error_hlsl_inout_scalar_extension)
2744 SemaRef.PerformCopyInitialization(Entity, Param->getBeginLoc(), ArgOpV);
2755 Res = SemaRef.ActOnBinOp(SemaRef.getCurScope(), Param->getBeginLoc(),
2773 Ty = SemaRef.getASTContext().getLValueReferenceType(Ty);
2781 if (SemaRef.RequireCompleteType(
2783 SemaRef.getASTContext().getBaseElementType(VD->getType()),
2849 SemaRef.Diag(VD->getLocation(),
2863 SemaRef.Diag(VD->getLocation(),