Lines Matching refs:castExpr
2874 ACCResult VisitCastExpr(CastExpr *e) {
3043 Expr *castExpr,
3074 Expr *castedE = castExpr;
3120 Expr *castedE = castExpr->IgnoreImpCasts();
3164 Expr *castExpr, Expr *realCast,
3168 (castRange.isValid() ? castRange.getBegin() : castExpr->getExprLoc());
3174 QualType castExprType = castExpr->getType();
3211 << castExpr->getSourceRange();
3214 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr);
3223 castType, castExpr, realCast, "__bridge ",
3231 S.Diag(br ? castExpr->getExprLoc() : noteLoc,
3236 castType, castExpr, realCast, "__bridge_transfer ",
3253 << castExpr->getSourceRange();
3255 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr);
3263 castType, castExpr, realCast, "__bridge ",
3271 S.Diag(br ? castExpr->getExprLoc() : noteLoc,
3276 castType, castExpr, realCast, "__bridge_retained ",
3286 << castRange << castExpr->getSourceRange();
3290 static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr,
3292 QualType T = castExpr->getType();
3315 S.Diag(castExpr->getLocStart(), diag::warn_objc_invalid_bridge)
3327 S.Diag(castExpr->getLocStart(), diag::warn_objc_invalid_bridge)
3336 S.Diag(castExpr->getLocStart(), diag::err_objc_cf_bridged_not_interface)
3337 << castExpr->getType() << Parm;
3351 static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr,
3369 castExpr->getType()->getAsObjCInterfacePointerType()) {
3376 S.Diag(castExpr->getLocStart(), diag::warn_objc_invalid_bridge_to_cf)
3377 << castExpr->getType()->getPointeeType() << T;
3381 } else if (castExpr->getType()->isObjCIdType() ||
3383 castExpr->getType(), CastClass)))
3390 S.Diag(castExpr->getLocStart(), diag::warn_objc_invalid_bridge_to_cf)
3391 << castExpr->getType() << castType;
3399 S.Diag(castExpr->getLocStart(), diag::err_objc_ns_bridged_invalid_cfobject)
3400 << castExpr->getType() << castType;
3413 void Sema::CheckTollFreeBridgeCast(QualType castType, Expr *castExpr) {
3417 ARCConversionTypeClass exprACTC = classifyTypeForARCConversion(castExpr->getType());
3422 CheckObjCBridgeNSCast<ObjCBridgeAttr>(*this, castType, castExpr, HasObjCBridgeAttr,
3428 CheckObjCBridgeNSCast<ObjCBridgeMutableAttr>(*this, castType, castExpr,
3434 CheckObjCBridgeNSCast<ObjCBridgeAttr>(*this, castType, castExpr, HasObjCBridgeAttr,
3437 CheckObjCBridgeNSCast<ObjCBridgeMutableAttr>(*this, castType, castExpr,
3443 CheckObjCBridgeCFCast<ObjCBridgeAttr>(*this, castType, castExpr, HasObjCBridgeAttr,
3449 CheckObjCBridgeCFCast<ObjCBridgeMutableAttr>(*this, castType, castExpr,
3455 CheckObjCBridgeCFCast<ObjCBridgeAttr>(*this, castType, castExpr, HasObjCBridgeAttr,
3458 CheckObjCBridgeCFCast<ObjCBridgeMutableAttr>(*this, castType, castExpr,
3463 void Sema::CheckObjCBridgeRelatedCast(QualType castType, Expr *castExpr) {
3464 QualType SrcType = castExpr->getType();
3465 if (ObjCPropertyRefExpr *PRE = dyn_cast<ObjCPropertyRefExpr>(castExpr)) {
3481 CheckObjCBridgeRelatedConversions(castExpr->getLocStart(),
3482 castType, SrcType, castExpr);
3486 bool Sema::CheckTollFreeBridgeStaticCast(QualType castType, Expr *castExpr,
3491 classifyTypeForARCConversion(castExpr->getType());
3495 CheckTollFreeBridgeCast(castType, castExpr);
3657 Expr *&castExpr, CheckedConversionKind CCK,
3660 QualType castExprType = castExpr->getType();
3691 : castExpr->getExprLoc());
3714 switch (ARCCastChecker(Context, exprACTC, castACTC, false).Visit(castExpr)) {
3726 castExpr = ImplicitCastExpr::Create(Context, castExpr->getType(),
3727 CK_ARCConsumeObject, castExpr,
3744 ConversionToObjCStringLiteralCheck(castType, castExpr))
3756 castExpr, castExpr, exprACTC, CCK);
3765 CastExpr *realCast = cast<CastExpr>(e->IgnoreParens());
3787 Expr *castExpr = realCast->getSubExpr();
3788 assert(classifyTypeForARCConversion(castExpr->getType()) == ACTC_retainable);
3791 castExpr, realCast, ACTC_retainable, CCK);