Lines Matching refs:SemaRef
108 NamedDecl *IF = SemaRef.LookupSingleName(SemaRef.TUScope, NSIdent, AtLoc, in BuildObjCStringLiteral()
123 NamedDecl *IF = SemaRef.LookupSingleName(SemaRef.TUScope, NSIdent, AtLoc, in BuildObjCStringLiteral()
271 ASTContext &CX = S.SemaRef.Context; in getNSNumberFactoryMethod()
277 LookupObjCInterfaceDeclForLiteral(S.SemaRef, Loc, SemaObjC::LK_Numeric); in getNSNumberFactoryMethod()
304 ParmVarDecl::Create(S.SemaRef.Context, Method, SourceLocation(), in getNSNumberFactoryMethod()
307 Method->setMethodParams(S.SemaRef.Context, value, std::nullopt); in getNSNumberFactoryMethod()
310 if (!validateBoxingMethod(S.SemaRef, Loc, S.NSNumberDecl, Sel, Method)) in getNSNumberFactoryMethod()
363 SemaRef.PerformCopyInitialization(Entity, SourceLocation(), Number); in BuildObjCNumericLiteral()
369 return SemaRef.MaybeBindToTemporary(new (Context) ObjCBoxedExpr( in BuildObjCNumericLiteral()
378 Inner = SemaRef.ActOnCXXBoolLiteral(ValueLoc, in ActOnObjCBoolLiteral()
383 Inner = SemaRef.ActOnIntegerConstant(ValueLoc, Value ? 1 : 0); in ActOnObjCBoolLiteral()
384 Inner = SemaRef.ImpCastExprToType(Inner.get(), Context.BoolTy, in ActOnObjCBoolLiteral()
519 ExprResult RValue = SemaRef.DefaultFunctionArrayLvalueConversion(ValueExpr); in BuildObjCBoxedExpr()
532 LookupObjCInterfaceDeclForLiteral(SemaRef, Loc, LK_String); in BuildObjCBoxedExpr()
594 if (!validateBoxingMethod(SemaRef, Loc, NSStringDecl, in BuildObjCBoxedExpr()
663 NSValueDecl = LookupObjCInterfaceDeclForLiteral(SemaRef, Loc, LK_Boxed); in BuildObjCBoxedExpr()
719 if (!validateBoxingMethod(SemaRef, Loc, NSValueDecl, in BuildObjCBoxedExpr()
742 SemaRef.DiagnoseUseOfDecl(BoxingMethod, Loc); in BuildObjCBoxedExpr()
747 ConvertedValueExpr = SemaRef.PerformCopyInitialization( in BuildObjCBoxedExpr()
755 SemaRef.PerformCopyInitialization(IE, SourceLocation(), ValueExpr); in BuildObjCBoxedExpr()
765 return SemaRef.MaybeBindToTemporary(BoxedExpr); in BuildObjCBoxedExpr()
783 ExprResult Result = SemaRef.CheckPlaceholderExpr(IndexExpr); in BuildObjCSubscriptExpression()
789 Result = SemaRef.DefaultLvalueConversion(BaseExpr); in BuildObjCSubscriptExpression()
807 LookupObjCInterfaceDeclForLiteral(SemaRef, Loc, SemaObjC::LK_Array); in BuildObjCArrayLiteral()
848 if (!validateBoxingMethod(SemaRef, Loc, NSArrayDecl, Sel, Method)) in BuildObjCArrayLiteral()
889 SemaRef, ElementsBuffer[I], RequiredType, true); in BuildObjCArrayLiteral()
900 return SemaRef.MaybeBindToTemporary(ObjCArrayLiteral::Create( in BuildObjCArrayLiteral()
967 SemaRef, Loc, SemaObjC::LK_Dictionary); in BuildObjCDictionaryLiteral()
1017 if (!validateBoxingMethod(SemaRef, SR.getBegin(), NSDictionaryDecl, Sel, in BuildObjCDictionaryLiteral()
1097 CheckObjCCollectionLiteralElement(SemaRef, Element.Key, KeyT); in BuildObjCDictionaryLiteral()
1103 CheckObjCCollectionLiteralElement(SemaRef, Element.Value, ValueT); in BuildObjCDictionaryLiteral()
1131 CheckObjCDictionaryLiteralDuplicateKeys(SemaRef, Literal); in BuildObjCDictionaryLiteral()
1132 return SemaRef.MaybeBindToTemporary(Literal); in BuildObjCDictionaryLiteral()
1146 if (SemaRef.RequireCompleteType(AtLoc, EncodedType, in BuildObjCEncodeExpression()
1174 QualType EncodedType = SemaRef.GetTypeFromParser(ty, &TInfo); in ParseObjCEncodeExpression()
1177 EncodedType, SemaRef.getLocForEndOfToken(LParenLoc)); in ParseObjCEncodeExpression()
1325 DiagnoseMismatchedSelectors(SemaRef, AtLoc, Method, LParenLoc, RParenLoc, in ParseObjCSelectorExpression()
1331 LookupDirectMethodInGlobalPool(SemaRef, Sel, onlyDirect, anyDirect); in ParseObjCSelectorExpression()
1343 findMethodInCurrentClass(SemaRef, Sel); in ParseObjCSelectorExpression()
1364 !SemaRef.getSourceManager().isInSystemHeader(Method->getLocation())) in ParseObjCSelectorExpression()
1428 DeclContext *DC = SemaRef.getFunctionLevelDeclContext(); in tryCaptureObjCSelf()
1437 SemaRef.tryCaptureVariable(method->getSelfDecl(), Loc); in tryCaptureObjCSelf()
1539 SemaRef, ReceiverType, Method, isClassMessage, isSuperMessage); in getMessageSendResultType()
1672 ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext); in EmitRelatedResultTypeNoteForReturn()
1747 result = SemaRef.checkUnknownAnyArg(SelLoc, Args[i], paramTy); in CheckMessageArgumentTypes()
1749 result = SemaRef.DefaultArgumentPromotion(Args[i]); in CheckMessageArgumentTypes()
1855 ExprResult argE = SemaRef.checkUnknownAnyArg(SelLoc, argExpr, paramType); in CheckMessageArgumentTypes()
1875 if (SemaRef.RequireCompleteType( in CheckMessageArgumentTypes()
1883 SemaRef.PerformCopyInitialization(Entity, SourceLocation(), argExpr); in CheckMessageArgumentTypes()
1896 SemaRef.maybeExtendBlockObject(arg); in CheckMessageArgumentTypes()
1908 ExprResult Arg = SemaRef.DefaultVariadicArgumentPromotion( in CheckMessageArgumentTypes()
1925 SemaRef.DiagnoseSentinelCalls(Method, SelLoc, Args); in CheckMessageArgumentTypes()
1937 SemaRef.CurContext->getNonClosureAncestor()); in isSelfExpr()
2007 if (SemaRef.RequireCompleteType(MemberLoc, OPT->getPointeeType(), in HandleExprPropertyRefExpr()
2015 if (SemaRef.DiagnoseUseOfDecl(PD, MemberLoc)) in HandleExprPropertyRefExpr()
2031 if (SemaRef.DiagnoseUseOfDecl(PD, MemberLoc)) in HandleExprPropertyRefExpr()
2049 Selector Sel = SemaRef.PP.getSelectorTable().getNullarySelector(Member); in HandleExprPropertyRefExpr()
2062 if (SemaRef.DiagnoseUseOfDecl(Getter, MemberLoc)) in HandleExprPropertyRefExpr()
2068 SemaRef.PP.getIdentifierTable(), SemaRef.PP.getSelectorTable(), Member); in HandleExprPropertyRefExpr()
2081 if (Setter && SemaRef.DiagnoseUseOfDecl(Setter, MemberLoc)) in HandleExprPropertyRefExpr()
2116 if (TypoCorrection Corrected = SemaRef.CorrectTypo( in HandleExprPropertyRefExpr()
2136 SemaRef.diagnoseTypo(Corrected, in HandleExprPropertyRefExpr()
2150 if (SemaRef.RequireCompleteType(MemberLoc, OBJPT->getPointeeType(), in HandleExprPropertyRefExpr()
2224 GetterSel = SemaRef.PP.getSelectorTable().getNullarySelector(&propertyName); in ActOnClassPropertyRefExpr()
2226 SemaRef.PP.getIdentifierTable(), SemaRef.PP.getSelectorTable(), in ActOnClassPropertyRefExpr()
2240 if (SemaRef.DiagnoseUseOfDecl(Getter, propertyNameLoc)) in ActOnClassPropertyRefExpr()
2255 if (Setter && SemaRef.DiagnoseUseOfDecl(Setter, propertyNameLoc)) in ActOnClassPropertyRefExpr()
2308 LookupResult Result(SemaRef, Name, NameLoc, Sema::LookupOrdinaryName); in getObjCMessageKind()
2309 SemaRef.LookupName(Result, S); in getObjCMessageKind()
2317 if (ObjCMethodDecl *Method = SemaRef.getCurMethodDecl()) { in getObjCMessageKind()
2352 SemaRef.DiagnoseUseOfDecl(Type, NameLoc); in getObjCMessageKind()
2360 ReceiverType = SemaRef.CreateParsedType(T, TSInfo); in getObjCMessageKind()
2365 ObjCInterfaceOrSuperCCC CCC(SemaRef.getCurMethodDecl()); in getObjCMessageKind()
2366 if (TypoCorrection Corrected = SemaRef.CorrectTypo( in getObjCMessageKind()
2372 SemaRef.diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) in getObjCMessageKind()
2379 SemaRef.diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) in getObjCMessageKind()
2383 ReceiverType = SemaRef.CreateParsedType(T, TSInfo); in getObjCMessageKind()
2423 SemaRef.getCurFunction()->ObjCShouldCallSuper = false; in ActOnSuperMessage()
2661 (void)SemaRef.DiagnoseUseOfDecl(Class, SelectorSlotLocs); in BuildClassMessage()
2667 if (SemaRef.RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), in BuildClassMessage()
2686 if (Method && SemaRef.DiagnoseUseOfDecl(Method, SelectorSlotLocs, nullptr, in BuildClassMessage()
2704 SemaRef.RequireCompleteType( in BuildClassMessage()
2729 } else if (ObjCMethodDecl *CurMeth = SemaRef.getCurMethodDecl()) { in BuildClassMessage()
2741 DiagnoseCStringFormatDirectiveInObjCAPI(SemaRef, Method, Sel, Args, NumArgs); in BuildClassMessage()
2755 checkCocoaAPI(SemaRef, Result); in BuildClassMessage()
2758 checkFoundationAPI(SemaRef, SelLoc, Method, ArrayRef(Args, NumArgs), in BuildClassMessage()
2760 return SemaRef.MaybeBindToTemporary(Result); in BuildClassMessage()
2774 SemaRef.GetTypeFromParser(Receiver, &ReceiverTypeInfo); in ActOnClassMessage()
2877 SemaRef.forceUnknownAnyToType(Receiver, Context.getObjCIdType()); in BuildInstanceMessage()
2879 Result = SemaRef.CheckPlaceholderExpr(Receiver); in BuildInstanceMessage()
2898 ExprResult Result = SemaRef.DefaultFunctionArrayLvalueConversion(Receiver); in BuildInstanceMessage()
2917 Receiver = SemaRef in BuildInstanceMessage()
2927 SemaRef.ImpCastExprToType(Receiver, Context.getObjCIdType(), Kind) in BuildInstanceMessage()
2933 if (SemaRef.RequireCompleteType(Loc, Receiver->getType(), in BuildInstanceMessage()
2938 SemaRef.PerformContextuallyConvertToObjCPointer(Receiver); in BuildInstanceMessage()
2967 if (ObjCMethodDecl *BestMethod = SemaRef.SelectBestMethod( in BuildInstanceMessage()
2974 SemaRef.DiagnoseUseOfDecl(Method, SelectorSlotLocs); in BuildInstanceMessage()
2990 if (Method && !isMethodDeclaredInRootProtocol(SemaRef, Method)) { in BuildInstanceMessage()
2998 if (ObjCMethodDecl *CurMeth = SemaRef.getCurMethodDecl()) { in BuildInstanceMessage()
3009 if (Method && SemaRef.DiagnoseUseOfDecl(Method, SelectorSlotLocs)) in BuildInstanceMessage()
3037 if (ObjCMethodDecl *BestMethod = SemaRef.SelectBestMethod( in BuildInstanceMessage()
3056 if (Method && SemaRef.DiagnoseUseOfDecl(Method, SelectorSlotLocs)) in BuildInstanceMessage()
3068 if (SemaRef.RequireCompleteType( in BuildInstanceMessage()
3114 if (ObjCMethodDecl *BestMethod = SemaRef.SelectBestMethod( in BuildInstanceMessage()
3131 SemaRef.DiagnoseUseOfDecl(Method, SelectorSlotLocs, forwardClass)) in BuildInstanceMessage()
3143 ? SemaRef.getEnclosingFunction() in BuildInstanceMessage()
3210 SemaRef.getCurMethodDecl()->isDesignatedInitializerForTheInterface( in BuildInstanceMessage()
3246 SemaRef.RequireCompleteType( in BuildInstanceMessage()
3332 DiagnoseCStringFormatDirectiveInObjCAPI(SemaRef, Method, Sel, Args, NumArgs); in BuildInstanceMessage()
3346 checkCocoaAPI(SemaRef, Result); in BuildInstanceMessage()
3357 if (const auto *CurMeth = SemaRef.getCurMethodDecl()) { in BuildInstanceMessage()
3365 checkFoundationAPI(SemaRef, SelLoc, Method, ArrayRef(Args, NumArgs), in BuildInstanceMessage()
3375 ObjCMethodDecl *method = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext); in BuildInstanceMessage()
3396 if (IsWeak && !SemaRef.isUnevaluatedContext() && in BuildInstanceMessage()
3399 SemaRef.getCurFunction()->recordUseOfWeak(Result, Prop); in BuildInstanceMessage()
3406 return SemaRef.MaybeBindToTemporary(Result); in BuildInstanceMessage()
3435 SemaRef.MaybeConvertParenListExprToParenExpr(S, Receiver); in ActOnInstanceMessage()
3753 LookupResult R(SemaRef, &Context.Idents.get(name), SourceLocation(), in isKnownName()
3755 return SemaRef.LookupName(R, SemaRef.TUScope, false); in isKnownName()
4154 SemaRef, castType, castExpr, HasObjCBridgeAttr, false); in CheckTollFreeBridgeCast()
4160 SemaRef, castType, castExpr, HasObjCBridgeMutableAttr, false); in CheckTollFreeBridgeCast()
4165 CheckObjCBridgeNSCast<ObjCBridgeAttr>(SemaRef, castType, castExpr, in CheckTollFreeBridgeCast()
4169 SemaRef, castType, castExpr, HasObjCBridgeMutableAttr, true); in CheckTollFreeBridgeCast()
4174 SemaRef, castType, castExpr, HasObjCBridgeAttr, false); in CheckTollFreeBridgeCast()
4180 SemaRef, castType, castExpr, HasObjCBridgeMutableAttr, false); in CheckTollFreeBridgeCast()
4185 CheckObjCBridgeCFCast<ObjCBridgeAttr>(SemaRef, castType, castExpr, in CheckTollFreeBridgeCast()
4189 SemaRef, castType, castExpr, HasObjCBridgeMutableAttr, true); in CheckTollFreeBridgeCast()
4249 LookupResult R(SemaRef, DeclarationName(RCId), SourceLocation(), in checkObjCBridgeRelatedComponents()
4251 if (!SemaRef.LookupName(R, SemaRef.TUScope)) { in checkObjCBridgeRelatedComponents()
4334 SemaRef.getLocForEndOfToken(SrcExpr->getEndLoc()); in CheckObjCBridgeRelatedConversions()
4362 SemaRef.getLocForEndOfToken(SrcExpr->getEndLoc()); in CheckObjCBridgeRelatedConversions()
4464 (castACTC == ACTC_coreFoundation && SemaRef.isCast(CCK)))) in CheckObjCConversion()
4468 SemaRef.isCast(CCK)) in CheckObjCConversion()
4486 SemaRef.Cleanup.setExprNeedsCleanups(true); in CheckObjCConversion()
4494 SemaRef.isCast(CCK)) in CheckObjCConversion()
4513 diagnoseObjCARCConversion(SemaRef, castRange, castType, castACTC, in CheckObjCConversion()
4549 diagnoseObjCARCConversion(SemaRef, castRange, castType, castACTC, castExpr, in diagnoseARCUnbridgedCast()
4568 SemaRef.CurFPFeatureOverrides()); in stripARCUnbridgedCast()
4657 ExprResult SubResult = SemaRef.UsualUnaryConversions(SubExpr); in BuildObjCBridgedCast()
4755 SemaRef.Cleanup.setExprNeedsCleanups(true); in BuildObjCBridgedCast()
4771 QualType T = SemaRef.GetTypeFromParser(Type, &TSInfo); in ActOnObjCBridgedCast()
4783 ObjCMethodDecl *CurMethod = SemaRef.getCurMethodDecl(); in LookupIvarInObjCMethod()
4865 SemaRef.LookupBuiltin(Lookup); in LookupInObjCMethod()
4874 ObjCMethodDecl *CurMethod = SemaRef.getCurMethodDecl(); in BuildIvarRefExpr()
4887 if (SemaRef.DiagnoseUseOfDecl(IV, Loc)) in BuildIvarRefExpr()
4898 SemaRef.ActOnIdExpression(S, SelfScopeSpec, TemplateKWLoc, SelfName, in BuildIvarRefExpr()
4904 SelfExpr = SemaRef.DefaultLvalueConversion(SelfExpr.get()); in BuildIvarRefExpr()
4908 SemaRef.MarkAnyDeclReferenced(Loc, IV, true); in BuildIvarRefExpr()
4920 if (!SemaRef.isUnevaluatedContext() && in BuildIvarRefExpr()
4922 SemaRef.getCurFunction()->recordUseOfWeak(Result); in BuildIvarRefExpr()
4924 if (getLangOpts().ObjCAutoRefCount && !SemaRef.isUnevaluatedContext()) in BuildIvarRefExpr()
4925 if (const BlockDecl *BD = SemaRef.CurContext->getInnermostBlockDecl()) in BuildIvarRefExpr()
4926 SemaRef.ImplicitlyRetainedSelfLocs.push_back({Loc, BD}); in BuildIvarRefExpr()
4943 RHS = SemaRef.ImpCastExprToType(RHS.get(), LHSTy, in FindCompositeObjCPointerType()
4949 LHS = SemaRef.ImpCastExprToType(LHS.get(), RHSTy, in FindCompositeObjCPointerType()
4956 RHS = SemaRef.ImpCastExprToType(RHS.get(), LHSTy, in FindCompositeObjCPointerType()
4962 LHS = SemaRef.ImpCastExprToType(LHS.get(), RHSTy, in FindCompositeObjCPointerType()
4969 RHS = SemaRef.ImpCastExprToType(RHS.get(), LHSTy, CK_BitCast); in FindCompositeObjCPointerType()
4974 LHS = SemaRef.ImpCastExprToType(LHS.get(), RHSTy, CK_BitCast); in FindCompositeObjCPointerType()
5026 LHS = SemaRef.ImpCastExprToType(LHS.get(), incompatTy, CK_BitCast); in FindCompositeObjCPointerType()
5027 RHS = SemaRef.ImpCastExprToType(RHS.get(), incompatTy, CK_BitCast); in FindCompositeObjCPointerType()
5031 LHS = SemaRef.ImpCastExprToType(LHS.get(), compositeType, CK_BitCast); in FindCompositeObjCPointerType()
5032 RHS = SemaRef.ImpCastExprToType(RHS.get(), compositeType, CK_BitCast); in FindCompositeObjCPointerType()
5052 LHS = SemaRef.ImpCastExprToType(LHS.get(), destType, CK_NoOp); in FindCompositeObjCPointerType()
5054 RHS = SemaRef.ImpCastExprToType(RHS.get(), destType, CK_BitCast); in FindCompositeObjCPointerType()
5073 RHS = SemaRef.ImpCastExprToType(RHS.get(), destType, CK_NoOp); in FindCompositeObjCPointerType()
5075 LHS = SemaRef.ImpCastExprToType(LHS.get(), destType, CK_BitCast); in FindCompositeObjCPointerType()
5143 LookupResult Result(SemaRef, &Context.Idents.get("BOOL"), OpLoc, in ActOnObjCBoolLiteral()
5145 if (SemaRef.LookupName(Result, SemaRef.getCurScope()) && in ActOnObjCBoolLiteral()
5186 if (FunctionScopeInfo *Context = SemaRef.getCurFunctionAvailabilityContext()) in ActOnObjCAvailabilityCheckExpr()
5200 SemaRef.maybeExtendBlockObject(E); in PrepareCastToObjCObjectPointer()