Lines Matching refs:RHSExpr

7619 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,  in DiagnoseConditionalForNull()  argument
7622 Expr *NonPointerExpr = RHSExpr; in DiagnoseConditionalForNull()
7628 NullExpr = RHSExpr; in DiagnoseConditionalForNull()
7680 Expr *RHSExpr = RHS.get(); in checkConditionalVoidType() local
7683 S.Diag(RHSExpr->getBeginLoc(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
7684 << RHSExpr->getSourceRange(); in checkConditionalVoidType()
7685 if (!RHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
8525 Expr *RHSExpr) { in DiagnoseConditionalPrecedence() argument
8553 SourceRange(CondRHS->getBeginLoc(), RHSExpr->getEndLoc())); in DiagnoseConditionalPrecedence()
8614 Expr *RHSExpr) { in ActOnConditionalOp() argument
8621 ExprResult RHSResult = CorrectDelayedTyposInExpr(RHSExpr); in ActOnConditionalOp()
8636 RHSExpr = RHSResult.get(); in ActOnConditionalOp()
8657 && commonExpr->getValueKind() == RHSExpr->getValueKind() in ActOnConditionalOp()
8660 && RHSExpr->isOrdinaryOrBitFieldObject() in ActOnConditionalOp()
8661 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) { in ActOnConditionalOp()
8686 QualType LHSTy = LHSExpr->getType(), RHSTy = RHSExpr->getType(); in ActOnConditionalOp()
8689 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
8971 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue); in CheckAssignmentConstraints() local
8972 ExprResult RHSPtr = &RHSExpr; in CheckAssignmentConstraints()
10025 ExprResult *RHSExpr = &RHS; in CheckVectorOperands() local
10026 *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast); in CheckVectorOperands()
10233 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
10238 << RHSExpr->getSourceRange(); in diagnoseArithmeticOnTwoVoidPointers()
10351 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
10353 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
10358 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
10365 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
10366 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
10376 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr); in checkArithmeticBinOpPointerOperands()
10377 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
10387 RHSExpr); in checkArithmeticBinOpPointerOperands()
10388 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
10395 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr)) in checkArithmeticBinOpPointerOperands()
10404 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
10406 Expr* IndexExpr = RHSExpr; in diagnoseStringPlusInt()
10408 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
10417 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in diagnoseStringPlusInt()
10422 if (IndexExpr == RHSExpr) { in diagnoseStringPlusInt()
10423 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getEndLoc()); in diagnoseStringPlusInt()
10434 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
10437 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
10441 StringRefExpr = RHSExpr; in diagnoseStringPlusChar()
10458 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in diagnoseStringPlusChar()
10472 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) { in diagnoseStringPlusChar()
10473 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getEndLoc()); in diagnoseStringPlusChar()
10485 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
10487 assert(RHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
10489 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
10490 << RHSExpr->getSourceRange(); in diagnosePointerIncompatibility()
12838 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
12847 if (LHSExpr->getExprLoc().isMacroID() || RHSExpr->getExprLoc().isMacroID()) in CheckIdentityFieldAssignment()
12852 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr); in CheckIdentityFieldAssignment()
12873 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr); in CheckIdentityFieldAssignment()
13661 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
13670 RHSExpr = RHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
13672 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr); in DiagnoseSelfAssignment()
13692 << RHSExpr->getSourceRange(); in DiagnoseSelfAssignment()
13787 Expr *RHSExpr) { in CorrectDelayedTyposInBinOp() argument
13788 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CorrectDelayedTyposInBinOp()
13838 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
13839 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) { in CreateBuiltinBinOp()
13847 RHSExpr->getBeginLoc(), RHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in CreateBuiltinBinOp()
13850 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
13851 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
13854 RHSExpr = Init.get(); in CreateBuiltinBinOp()
13857 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
13866 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr); in CreateBuiltinBinOp()
13872 QualType RHSTy = RHSExpr->getType(); in CreateBuiltinBinOp()
13876 SourceRange SR(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in CreateBuiltinBinOp()
14114 Expr *RHSExpr) { in DiagnoseBitwisePrecedence() argument
14116 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr); in DiagnoseBitwisePrecedence()
14133 : SourceRange(OpLoc, RHSExpr->getEndLoc()); in DiagnoseBitwisePrecedence()
14137 ? SourceRange(LHSBO->getRHS()->getBeginLoc(), RHSExpr->getEndLoc()) in DiagnoseBitwisePrecedence()
14144 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
14184 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
14188 if (EvaluatesAsFalse(S, RHSExpr)) in DiagnoseLogicalAndInLogicalOrLHS()
14206 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
14207 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) { in DiagnoseLogicalAndInLogicalOrRHS()
14252 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
14266 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
14274 SourceRange(OCE->getArg(1)->getBeginLoc(), RHSExpr->getEndLoc())); in DiagnoseShiftCompare()
14281 Expr *RHSExpr){ in DiagnoseBinOpPrecedence() argument
14284 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14290 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, RHSExpr); in DiagnoseBinOpPrecedence()
14296 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14297 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14304 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift); in DiagnoseBinOpPrecedence()
14310 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14316 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
14319 assert(RHSExpr && "ActOnBinOp(): missing right expression"); in ActOnBinOp()
14322 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
14324 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
14370 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
14372 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14376 RHSExpr = RHS.get(); in BuildBinOp()
14389 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14398 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
14400 RHSExpr = resolvedRHS.get(); in BuildBinOp()
14402 if (RHSExpr->isTypeDependent() || in BuildBinOp()
14403 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
14404 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14435 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
14440 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() || in BuildBinOp()
14442 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14444 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14450 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14452 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
14454 RHSExpr = resolvedRHS.get(); in BuildBinOp()
14460 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
14461 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14466 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
14467 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14471 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())) { in BuildBinOp()
14473 assert((LHSExpr->containsErrors() || RHSExpr->containsErrors()) && in BuildBinOp()
14480 Context, LHSExpr, RHSExpr, Opc, in BuildBinOp()
14500 ResultType = RHSExpr->getType(); in BuildBinOp()
14506 return BinaryOperator::Create(Context, LHSExpr, RHSExpr, Opc, ResultType, in BuildBinOp()
14512 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
15117 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
15119 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
15138 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
15145 return new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, in ActOnChooseExpr()