Lines Matching defs:RHSExpr
5621 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
5624 Expr *NonPointerExpr = RHSExpr;
5630 NullExpr = RHSExpr;
5682 Expr *RHSExpr = RHS.get();
5685 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
5686 << RHSExpr->getSourceRange();
5687 if (!RHSExpr->getType()->isVoidType())
6426 Expr *RHSExpr) {
6449 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd()));
6457 Expr *RHSExpr) {
6485 && commonExpr->getValueKind() == RHSExpr->getValueKind()
6488 && RHSExpr->isOrdinaryOrBitFieldObject()
6489 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) {
6506 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
6726 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
6727 ExprResult RHSPtr = &RHSExpr;
7426 Expr *LHSExpr, Expr *RHSExpr) {
7431 << RHSExpr->getSourceRange();
7528 Expr *LHSExpr, Expr *RHSExpr) {
7530 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType();
7535 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType();
7540 const PointerType *rhsPtr = RHSExpr->getType()->getAs<PointerType>();
7544 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/
7545 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
7555 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr);
7556 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
7566 RHSExpr);
7567 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
7574 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr))
7583 Expr *LHSExpr, Expr *RHSExpr) {
7585 Expr* IndexExpr = RHSExpr;
7587 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
7605 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7610 if (IndexExpr == RHSExpr) {
7611 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
7622 Expr *LHSExpr, Expr *RHSExpr) {
7625 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts());
7629 StringRefExpr = RHSExpr;
7646 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7660 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) {
7661 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
7673 Expr *LHSExpr, Expr *RHSExpr) {
7675 assert(RHSExpr->getType()->isAnyPointerType());
7677 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
7678 << RHSExpr->getSourceRange();
9232 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
9237 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr);
9245 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr);
9889 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
9896 RHSExpr = RHSExpr->IgnoreParenImpCasts();
9898 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
9917 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
9980 Expr *LHSExpr, Expr *RHSExpr) {
9981 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) {
9989 InitializationKind::CreateDirectList(RHSExpr->getLocStart());
9992 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr);
9993 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr);
9996 RHSExpr = Init.get();
9999 ExprResult LHS = LHSExpr, RHS = RHSExpr;
10012 RHS = CorrectDelayedTyposInExpr(RHSExpr, [Opc, LHS](Expr *E) {
10172 Expr *RHSExpr) {
10174 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr);
10191 : SourceRange(OpLoc, RHSExpr->getLocEnd());
10194 SourceRange(LHSBO->getRHS()->getLocStart(), RHSExpr->getLocEnd())
10201 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
10256 Expr *LHSExpr, Expr *RHSExpr) {
10260 if (EvaluatesAsFalse(S, RHSExpr))
10278 Expr *LHSExpr, Expr *RHSExpr) {
10279 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
10315 Expr *LHSExpr, Expr *RHSExpr) {
10329 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
10338 RHSExpr->getLocEnd()));
10345 Expr *RHSExpr){
10348 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
10353 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, RHSExpr);
10359 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
10360 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
10367 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift);
10373 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
10379 Expr *LHSExpr, Expr *RHSExpr) {
10382 assert(RHSExpr && "ActOnBinOp(): missing right expression");
10385 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
10387 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
10412 Expr *LHSExpr, Expr *RHSExpr) {
10424 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
10433 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
10435 RHSExpr = resolvedRHS.get();
10437 if (RHSExpr->isTypeDependent() ||
10438 RHSExpr->getType()->isOverloadableType())
10439 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10448 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) {
10452 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
10453 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10456 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10458 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
10464 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10466 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
10468 RHSExpr = resolvedRHS.get();
10474 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
10475 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10480 RHSExpr->getType()->isOverloadableType())
10481 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
10485 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
11063 Expr *LHSExpr, Expr *RHSExpr,
11065 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
11087 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
11096 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc,