Home | History | Annotate | Download | only in Sema

Lines Matching refs:RHSExpr

5392 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
5395 Expr *NonPointerExpr = RHSExpr;
5401 NullExpr = RHSExpr;
5476 Expr *RHSExpr = RHS.get();
5479 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
5480 << RHSExpr->getSourceRange();
5481 if (!RHSExpr->getType()->isVoidType())
6039 Expr *RHSExpr) {
6062 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd()));
6070 Expr *RHSExpr) {
6089 && commonExpr->getValueKind() == RHSExpr->getValueKind()
6092 && RHSExpr->isOrdinaryOrBitFieldObject()
6093 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) {
6110 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
6330 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
6331 ExprResult RHSPtr = &RHSExpr;
7019 Expr *LHSExpr, Expr *RHSExpr) {
7024 << RHSExpr->getSourceRange();
7114 Expr *LHSExpr, Expr *RHSExpr) {
7116 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType();
7121 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType();
7128 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr);
7129 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
7139 RHSExpr);
7140 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
7147 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr))
7156 Expr *LHSExpr, Expr *RHSExpr) {
7158 Expr* IndexExpr = RHSExpr;
7160 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
7178 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7183 if (IndexExpr == RHSExpr) {
7184 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
7195 Expr *LHSExpr, Expr *RHSExpr) {
7199 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts());
7201 StringRefExpr = dyn_cast<DeclRefExpr>(RHSExpr->IgnoreImpCasts());
7219 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7233 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) {
7234 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
7246 Expr *LHSExpr, Expr *RHSExpr) {
7248 assert(RHSExpr->getType()->isAnyPointerType());
7250 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
7251 << RHSExpr->getSourceRange();
8595 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
8600 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr);
8608 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr);
9231 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
9238 RHSExpr = RHSExpr->IgnoreParenImpCasts();
9240 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
9259 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
9310 Expr *LHSExpr, Expr *RHSExpr) {
9311 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) {
9319 InitializationKind::CreateDirectList(RHSExpr->getLocStart());
9322 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr);
9323 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr);
9326 RHSExpr = Init.get();
9329 ExprResult LHS = LHSExpr, RHS = RHSExpr;
9483 Expr *RHSExpr) {
9485 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr);
9502 : SourceRange(OpLoc, RHSExpr->getLocEnd());
9505 SourceRange(LHSBO->getRHS()->getLocStart(), RHSExpr->getLocEnd())
9512 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
9567 Expr *LHSExpr, Expr *RHSExpr) {
9571 if (EvaluatesAsFalse(S, RHSExpr))
9589 Expr *LHSExpr, Expr *RHSExpr) {
9590 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
9626 Expr *LHSExpr, Expr *RHSExpr) {
9640 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
9649 RHSExpr->getLocEnd()));
9656 Expr *RHSExpr){
9659 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
9664 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, RHSExpr);
9670 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
9671 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
9678 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift);
9684 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
9690 Expr *LHSExpr, Expr *RHSExpr) {
9693 assert(RHSExpr && "ActOnBinOp(): missing right expression");
9696 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
9698 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
9723 Expr *LHSExpr, Expr *RHSExpr) {
9735 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
9744 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
9746 RHSExpr = resolvedRHS.get();
9748 if (RHSExpr->isTypeDependent() ||
9749 RHSExpr->getType()->isOverloadableType())
9750 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9759 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) {
9763 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9764 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9767 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9769 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9775 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9777 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
9779 RHSExpr = resolvedRHS.get();
9785 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9786 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9791 RHSExpr->getType()->isOverloadableType())
9792 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9796 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
10377 Expr *LHSExpr, Expr *RHSExpr,
10379 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
10401 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
10410 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc,