Home | History | Annotate | Download | only in Sema

Lines Matching refs:Receiver

1449 /// Determine the result type of a message send based on the receiver type,
1492 // - if the receiver is super, T is a pointer to the class of the
1503 // - if the receiver is the name of a class U, T is a pointer to U
1506 // - if the receiver is of type Class or qualified Class type,
1513 // - if the receiver is id, qualified id, Class, or qualified Class, T
1514 // is the receiver type, otherwise
1515 // - T is the type of the receiver expression.
1519 QualType Sema::getMessageSendResultType(const Expr *Receiver,
1530 // If this is a class message, ignore the nullability of the receiver.
1537 if (Receiver && Receiver->isObjCSelfExpr()) {
1544 cast<DeclRefExpr>(Receiver->IgnoreParenImpCasts())->getDecl())
1581 // The table of nullability mappings, indexed by the receiver's nullability
1713 const Expr *Receiver, QualType ReceiverType, MultiExprArg Args,
1793 ReturnType = getMessageSendResultType(Receiver, ReceiverType, Method,
1925 bool Sema::isSelfExpr(Expr *receiver, const ObjCMethodDecl *method) {
1928 receiver = receiver->IgnoreParenLValueCasts();
1929 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(receiver))
2170 // If the "receiver" is 'super' in a method, handle it as an expression-like
2584 /// receiver of this message. This may be NULL, in which case we are
2631 // If the receiver type is dependent, we can't type-check anything
2689 if (CheckMessageArgumentTypes(/*Receiver=*/nullptr, ReceiverType,
2761 ParsedType Receiver,
2768 QualType ReceiverType = GetTypeFromParser(Receiver, &ReceiverTypeInfo);
2781 ExprResult Sema::BuildInstanceMessageImplicit(Expr *Receiver,
2787 return BuildInstanceMessage(Receiver, ReceiverType,
2788 /*SuperLoc=*/!Receiver ? Loc : SourceLocation(),
2816 /// \param Receiver The expression that computes the object that will
2822 /// message. When a \p Receiver expression is provided, this is the
2839 ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
2849 assert((Receiver || SuperLoc.isValid()) && "If the Receiver is null, the "
2853 // The location of the receiver.
2854 SourceLocation Loc = SuperLoc.isValid() ? SuperLoc : Receiver->getBeginLoc();
2856 SuperLoc.isValid()? SuperLoc : Receiver->getSourceRange();
2870 // If we have a receiver expression, perform appropriate promotions
2871 // and determine receiver type.
2872 if (Receiver) {
2873 if (Receiver->hasPlaceholderType()) {
2875 if (Receiver->getType() == Context.UnknownAnyTy)
2876 Result = forceUnknownAnyToType(Receiver, Context.getObjCIdType());
2878 Result = CheckPlaceholderExpr(Receiver);
2880 Receiver = Result.get();
2883 if (Receiver->isTypeDependent()) {
2884 // If the receiver is type-dependent, we can't type-check anything
2890 Context, Context.DependentTy, VK_RValue, LBracLoc, Receiver, Sel,
2895 // If necessary, apply function/array conversion to the receiver.
2897 ExprResult Result = DefaultFunctionArrayLvalueConversion(Receiver);
2900 Receiver = Result.get();
2901 ReceiverType = Receiver->getType();
2903 // If the receiver is an ObjC pointer, a block pointer, or an
2905 // special conversion in order to look up a receiver.
2916 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(),
2920 bool IsNull = Receiver->isNullPointerConstant(Context,
2923 Receiver = ImpCastExprToType(Receiver, Context.getObjCIdType(),
2926 ReceiverType = Receiver->getType();
2928 // The receiver must be a complete type.
2929 if (RequireCompleteType(Loc, Receiver->getType(),
2933 ExprResult result = PerformContextuallyConvertToObjCPointer(Receiver);
2935 Receiver = result.get();
2936 ReceiverType = Receiver->getType();
2943 // of the more detailed type-checking on the receiver.
2952 (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {
3010 if (!Receiver || !isSelfExpr(Receiver)) {
3073 Diag(Receiver ? Receiver->getBeginLoc() : SuperLoc,
3095 if (!Method && (!Receiver || !isSelfExpr(Receiver))) {
3129 // Reject other random receiver types (e.g. structs).
3142 Diag(Receiver->getExprLoc(),
3152 !(Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount)) {
3154 auto Builder = Diag(Receiver->getExprLoc(),
3156 if (Receiver->isObjCSelfExpr()) {
3180 Diag(Receiver->getExprLoc(), diag::warn_messaging_unqualified_id);
3185 (SuperLoc.isValid() || isSelfExpr(Receiver))) {
3217 (SuperLoc.isValid() || isSelfExpr(Receiver))) {
3232 if (CheckMessageArgumentTypes(Receiver, ReceiverType,
3336 Receiver, Sel, SelectorLocs, Method,
3348 if (Receiver && isSelfExpr(Receiver)) {
3366 (SuperLoc.isValid() || isSelfExpr(Receiver))) {
3417 Expr *Receiver,
3423 if (!Receiver)
3427 if (isa<ParenListExpr>(Receiver)) {
3428 ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Receiver);
3430 Receiver = Result.get();
3440 return BuildInstanceMessage(Receiver, Receiver->getType(),