Lines Matching refs:RHSExpr
5814 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, in DiagnoseConditionalForNull() argument
5817 Expr *NonPointerExpr = RHSExpr; in DiagnoseConditionalForNull()
5823 NullExpr = RHSExpr; in DiagnoseConditionalForNull()
5875 Expr *RHSExpr = RHS.get(); in checkConditionalVoidType() local
5878 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
5879 << RHSExpr->getSourceRange(); in checkConditionalVoidType()
5880 if (!RHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
6591 Expr *RHSExpr) { in DiagnoseConditionalPrecedence() argument
6614 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd())); in DiagnoseConditionalPrecedence()
6622 Expr *RHSExpr) { in ActOnConditionalOp() argument
6650 && commonExpr->getValueKind() == RHSExpr->getValueKind() in ActOnConditionalOp()
6653 && RHSExpr->isOrdinaryOrBitFieldObject() in ActOnConditionalOp()
6654 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) { in ActOnConditionalOp()
6671 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
6893 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue); in CheckAssignmentConstraints() local
6894 ExprResult RHSPtr = &RHSExpr; in CheckAssignmentConstraints()
7658 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
7663 << RHSExpr->getSourceRange(); in diagnoseArithmeticOnTwoVoidPointers()
7760 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
7762 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
7767 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
7772 const PointerType *rhsPtr = RHSExpr->getType()->getAs<PointerType>(); in checkArithmeticBinOpPointerOperands()
7776 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
7777 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
7787 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr); in checkArithmeticBinOpPointerOperands()
7788 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
7798 RHSExpr); in checkArithmeticBinOpPointerOperands()
7799 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
7806 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr)) in checkArithmeticBinOpPointerOperands()
7815 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
7817 Expr* IndexExpr = RHSExpr; in diagnoseStringPlusInt()
7819 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
7837 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
7842 if (IndexExpr == RHSExpr) { in diagnoseStringPlusInt()
7843 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
7854 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
7857 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
7861 StringRefExpr = RHSExpr; in diagnoseStringPlusChar()
7878 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
7892 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) { in diagnoseStringPlusChar()
7893 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
7905 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
7907 assert(RHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
7909 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
7910 << RHSExpr->getSourceRange(); in diagnosePointerIncompatibility()
9496 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
9501 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr); in CheckIdentityFieldAssignment()
9509 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr); in CheckIdentityFieldAssignment()
10167 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
10174 RHSExpr = RHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
10176 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr); in DiagnoseSelfAssignment()
10195 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in DiagnoseSelfAssignment()
10258 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
10259 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) { in CreateBuiltinBinOp()
10267 InitializationKind::CreateDirectList(RHSExpr->getLocStart()); in CreateBuiltinBinOp()
10270 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
10271 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
10274 RHSExpr = Init.get(); in CreateBuiltinBinOp()
10277 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
10290 RHS = CorrectDelayedTyposInExpr(RHSExpr, [Opc, LHS](Expr *E) { in CreateBuiltinBinOp()
10305 RHSExpr->getType()->isAtomicType()) { in CreateBuiltinBinOp()
10306 SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in CreateBuiltinBinOp()
10464 Expr *RHSExpr) { in DiagnoseBitwisePrecedence() argument
10466 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr); in DiagnoseBitwisePrecedence()
10483 : SourceRange(OpLoc, RHSExpr->getLocEnd()); in DiagnoseBitwisePrecedence()
10486 SourceRange(LHSBO->getRHS()->getLocStart(), RHSExpr->getLocEnd()) in DiagnoseBitwisePrecedence()
10493 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
10533 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
10537 if (EvaluatesAsFalse(S, RHSExpr)) in DiagnoseLogicalAndInLogicalOrLHS()
10555 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
10556 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) { in DiagnoseLogicalAndInLogicalOrRHS()
10601 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
10615 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
10624 RHSExpr->getLocEnd())); in DiagnoseShiftCompare()
10631 Expr *RHSExpr){ in DiagnoseBinOpPrecedence() argument
10634 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10640 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, RHSExpr); in DiagnoseBinOpPrecedence()
10646 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10647 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10654 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift); in DiagnoseBinOpPrecedence()
10660 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10666 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
10669 assert(RHSExpr && "ActOnBinOp(): missing right expression"); in ActOnBinOp()
10672 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
10674 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
10699 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
10711 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10720 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
10722 RHSExpr = resolvedRHS.get(); in BuildBinOp()
10724 if (RHSExpr->isTypeDependent() || in BuildBinOp()
10725 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
10726 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10735 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
10739 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
10740 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10743 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10745 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10751 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10753 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
10755 RHSExpr = resolvedRHS.get(); in BuildBinOp()
10761 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
10762 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10767 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
10768 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10772 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11358 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
11360 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
11382 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
11391 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc, in ActOnChooseExpr()