Lines Matching defs:RHSExpr
4767 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
4770 Expr *NonPointerExpr = RHSExpr;
4776 NullExpr = RHSExpr;
4851 Expr *RHSExpr = RHS.get();
4854 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
4855 << RHSExpr->getSourceRange();
4856 if (!RHSExpr->getType()->isVoidType())
5384 Expr *RHSExpr) {
5407 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd()));
5415 Expr *RHSExpr) {
5427 && commonExpr->getValueKind() == RHSExpr->getValueKind()
5430 && RHSExpr->isOrdinaryOrBitFieldObject()
5431 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) {
5448 ExprResult Cond = Owned(CondExpr), LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
5668 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
5669 ExprResult RHSPtr = &RHSExpr;
6303 Expr *LHSExpr, Expr *RHSExpr) {
6308 << RHSExpr->getSourceRange();
6398 Expr *LHSExpr, Expr *RHSExpr) {
6400 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType();
6405 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType();
6412 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr);
6413 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
6423 RHSExpr);
6424 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
6431 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr))
6440 Expr *LHSExpr, Expr *RHSExpr) {
6442 Expr* IndexExpr = RHSExpr;
6444 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
6462 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
6467 if (IndexExpr == RHSExpr) {
6468 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
6479 Expr *LHSExpr, Expr *RHSExpr) {
6481 assert(RHSExpr->getType()->isAnyPointerType());
6483 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
6484 << RHSExpr->getSourceRange();
7772 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
7777 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr);
7785 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr);
8366 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
8373 RHSExpr = RHSExpr->IgnoreParenImpCasts();
8375 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
8394 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
8402 Expr *LHSExpr, Expr *RHSExpr) {
8403 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) {
8411 InitializationKind::CreateDirectList(RHSExpr->getLocStart());
8414 InitializationSequence InitSeq(*this, Entity, Kind, &RHSExpr, 1);
8415 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr);
8418 RHSExpr = Init.take();
8421 ExprResult LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
8557 Expr *RHSExpr) {
8559 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr);
8576 : SourceRange(OpLoc, RHSExpr->getLocEnd());
8579 SourceRange(LHSBO->getRHS()->getLocStart(), RHSExpr->getLocEnd())
8586 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
8639 Expr *LHSExpr, Expr *RHSExpr) {
8643 if (EvaluatesAsFalse(S, RHSExpr))
8661 Expr *LHSExpr, Expr *RHSExpr) {
8662 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
8701 Expr *RHSExpr){
8704 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
8709 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, RHSExpr);
8715 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
8716 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
8723 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift);
8730 Expr *LHSExpr, Expr *RHSExpr) {
8733 assert((RHSExpr != 0) && "ActOnBinOp(): missing right expression");
8736 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
8738 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
8763 Expr *LHSExpr, Expr *RHSExpr) {
8775 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
8784 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
8786 RHSExpr = resolvedRHS.take();
8788 if (RHSExpr->isTypeDependent() ||
8789 RHSExpr->getType()->isOverloadableType())
8790 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8799 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) {
8803 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8804 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8807 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8809 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8815 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8817 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
8819 RHSExpr = resolvedRHS.take();
8825 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8826 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8831 RHSExpr->getType()->isOverloadableType())
8832 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8836 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9416 Expr *LHSExpr, Expr *RHSExpr,
9418 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
9438 Expr *ActiveExpr = condEval.getZExtValue() ? LHSExpr : RHSExpr;
9446 return Owned(new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,