Lines Matching defs:RHSExpr
7841 bool Sema::DiagnoseConditionalForNull(const Expr *LHSExpr, const Expr *RHSExpr,
7844 const Expr *NonPointerExpr = RHSExpr;
7850 NullExpr = RHSExpr;
8619 const Expr *RHSExpr) {
8647 SourceRange(CondRHS->getBeginLoc(), RHSExpr->getEndLoc()));
8706 Expr *RHSExpr) {
8713 ExprResult RHSResult = CorrectDelayedTyposInExpr(RHSExpr);
8728 RHSExpr = RHSResult.get();
8749 && commonExpr->getValueKind() == RHSExpr->getValueKind()
8752 && RHSExpr->isOrdinaryOrBitFieldObject()
8753 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) {
8778 QualType LHSTy = LHSExpr->getType(), RHSTy = RHSExpr->getType();
8781 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
9087 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_PRValue);
9088 ExprResult RHSPtr = &RHSExpr;
10260 ExprResult *RHSExpr = &RHS;
10261 *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast);
10565 Expr *LHSExpr, Expr *RHSExpr) {
10570 << RHSExpr->getSourceRange();
10701 Expr *LHSExpr, Expr *RHSExpr) {
10703 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType();
10708 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType();
10715 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/
10716 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
10726 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr);
10727 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
10737 RHSExpr);
10738 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
10745 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr))
10754 Expr *LHSExpr, Expr *RHSExpr) {
10756 Expr* IndexExpr = RHSExpr;
10758 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
10767 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10772 if (IndexExpr == RHSExpr) {
10773 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getEndLoc());
10784 Expr *LHSExpr, Expr *RHSExpr) {
10787 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts());
10791 StringRefExpr = RHSExpr;
10808 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10822 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) {
10823 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getEndLoc());
10835 Expr *LHSExpr, Expr *RHSExpr) {
10837 assert(RHSExpr->getType()->isAnyPointerType());
10839 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
10840 << RHSExpr->getSourceRange();
13494 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
13503 if (LHSExpr->getExprLoc().isMacroID() || RHSExpr->getExprLoc().isMacroID())
13508 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr);
13529 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr);
14411 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
14420 RHSExpr = RHSExpr->IgnoreParenImpCasts();
14422 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
14442 << RHSExpr->getSourceRange();
14543 Expr *RHSExpr) {
14544 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14591 Expr *LHSExpr, Expr *RHSExpr) {
14592 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) {
14600 RHSExpr->getBeginLoc(), RHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
14603 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr);
14604 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr);
14607 RHSExpr = Init.get();
14610 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14619 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr);
14625 QualType RHSTy = RHSExpr->getType();
14629 SourceRange SR(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
14649 checkTypeSupport(RHSExpr->getType(), OpLoc, /*ValueDecl*/ nullptr);
14881 Expr *RHSExpr) {
14883 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr);
14900 : SourceRange(OpLoc, RHSExpr->getEndLoc());
14904 ? SourceRange(LHSBO->getRHS()->getBeginLoc(), RHSExpr->getEndLoc())
14911 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
14935 Expr *LHSExpr, Expr *RHSExpr) {
14956 Expr *LHSExpr, Expr *RHSExpr) {
14957 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
15000 Expr *LHSExpr, Expr *RHSExpr) {
15014 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
15022 SourceRange(OCE->getArg(1)->getBeginLoc(), RHSExpr->getEndLoc()));
15029 Expr *RHSExpr){
15032 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
15038 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, RHSExpr);
15044 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
15045 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
15052 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift);
15058 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
15063 Expr *LHSExpr, Expr *RHSExpr) {
15066 assert(RHSExpr && "ActOnBinOp(): missing right expression");
15069 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
15071 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
15126 Expr *LHSExpr, Expr *RHSExpr) {
15128 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr);
15132 RHSExpr = RHS.get();
15145 return PseudoObject().checkAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
15154 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
15156 RHSExpr = resolvedRHS.get();
15158 if (RHSExpr->isTypeDependent() ||
15159 RHSExpr->getType()->isOverloadableType())
15160 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15191 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) {
15196 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15198 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15200 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15206 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15208 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
15210 RHSExpr = resolvedRHS.get();
15216 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15218 RHSExpr->getType()->isOverloadableType())
15219 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15223 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())) {
15225 assert((LHSExpr->containsErrors() || RHSExpr->containsErrors()) &&
15232 Context, LHSExpr, RHSExpr, Opc,
15252 ResultType = RHSExpr->getType();
15258 return BinaryOperator::Create(Context, LHSExpr, RHSExpr, Opc, ResultType,
15264 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15896 Expr *LHSExpr, Expr *RHSExpr,
15898 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
15917 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
15924 return new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,