Lines Matching refs:RHSExpr
6117 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, in DiagnoseConditionalForNull() argument
6120 Expr *NonPointerExpr = RHSExpr; in DiagnoseConditionalForNull()
6126 NullExpr = RHSExpr; in DiagnoseConditionalForNull()
6178 Expr *RHSExpr = RHS.get(); in checkConditionalVoidType() local
6181 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
6182 << RHSExpr->getSourceRange(); in checkConditionalVoidType()
6183 if (!RHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
6979 Expr *RHSExpr) { in DiagnoseConditionalPrecedence() argument
7002 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd())); in DiagnoseConditionalPrecedence()
7010 Expr *RHSExpr) { in ActOnConditionalOp() argument
7017 ExprResult RHSResult = CorrectDelayedTyposInExpr(RHSExpr); in ActOnConditionalOp()
7032 RHSExpr = RHSResult.get(); in ActOnConditionalOp()
7053 && commonExpr->getValueKind() == RHSExpr->getValueKind() in ActOnConditionalOp()
7056 && RHSExpr->isOrdinaryOrBitFieldObject() in ActOnConditionalOp()
7057 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) { in ActOnConditionalOp()
7074 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
7296 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue); in CheckAssignmentConstraints() local
7297 ExprResult RHSPtr = &RHSExpr; in CheckAssignmentConstraints()
8094 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
8099 << RHSExpr->getSourceRange(); in diagnoseArithmeticOnTwoVoidPointers()
8196 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
8198 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
8203 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
8208 const PointerType *rhsPtr = RHSExpr->getType()->getAs<PointerType>(); in checkArithmeticBinOpPointerOperands()
8212 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
8213 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
8223 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr); in checkArithmeticBinOpPointerOperands()
8224 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
8234 RHSExpr); in checkArithmeticBinOpPointerOperands()
8235 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
8242 if (isRHSPointer && checkArithmeticIncompletePointerType(S, Loc, RHSExpr)) in checkArithmeticBinOpPointerOperands()
8251 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
8253 Expr* IndexExpr = RHSExpr; in diagnoseStringPlusInt()
8255 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
8273 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
8278 if (IndexExpr == RHSExpr) { in diagnoseStringPlusInt()
8279 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
8290 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
8293 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
8297 StringRefExpr = RHSExpr; in diagnoseStringPlusChar()
8314 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
8328 if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) { in diagnoseStringPlusChar()
8329 SourceLocation EndLoc = Self.getLocForEndOfToken(RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
8341 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
8343 assert(RHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
8345 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
8346 << RHSExpr->getSourceRange(); in diagnosePointerIncompatibility()
9945 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
9950 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr); in CheckIdentityFieldAssignment()
9958 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr); in CheckIdentityFieldAssignment()
10683 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
10690 RHSExpr = RHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
10692 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr); in DiagnoseSelfAssignment()
10711 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in DiagnoseSelfAssignment()
10774 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
10775 if (getLangOpts().CPlusPlus11 && isa<InitListExpr>(RHSExpr)) { in CreateBuiltinBinOp()
10783 InitializationKind::CreateDirectList(RHSExpr->getLocStart()); in CreateBuiltinBinOp()
10786 InitializationSequence InitSeq(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
10787 ExprResult Init = InitSeq.Perform(*this, Entity, Kind, RHSExpr); in CreateBuiltinBinOp()
10790 RHSExpr = Init.get(); in CreateBuiltinBinOp()
10793 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
10806 RHS = CorrectDelayedTyposInExpr(RHSExpr, [Opc, LHS](Expr *E) { in CreateBuiltinBinOp()
10819 QualType RHSTy = RHSExpr->getType(); in CreateBuiltinBinOp()
10823 SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in CreateBuiltinBinOp()
10991 Expr *RHSExpr) { in DiagnoseBitwisePrecedence() argument
10993 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr); in DiagnoseBitwisePrecedence()
11010 : SourceRange(OpLoc, RHSExpr->getLocEnd()); in DiagnoseBitwisePrecedence()
11013 SourceRange(LHSBO->getRHS()->getLocStart(), RHSExpr->getLocEnd()) in DiagnoseBitwisePrecedence()
11020 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
11060 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
11064 if (EvaluatesAsFalse(S, RHSExpr)) in DiagnoseLogicalAndInLogicalOrLHS()
11082 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
11083 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) { in DiagnoseLogicalAndInLogicalOrRHS()
11128 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
11142 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
11151 RHSExpr->getLocEnd())); in DiagnoseShiftCompare()
11158 Expr *RHSExpr){ in DiagnoseBinOpPrecedence() argument
11161 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11167 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, RHSExpr); in DiagnoseBinOpPrecedence()
11173 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11174 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11181 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift); in DiagnoseBinOpPrecedence()
11187 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11193 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
11196 assert(RHSExpr && "ActOnBinOp(): missing right expression"); in ActOnBinOp()
11199 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
11201 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
11226 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
11238 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11247 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
11249 RHSExpr = resolvedRHS.get(); in BuildBinOp()
11251 if (RHSExpr->isTypeDependent() || in BuildBinOp()
11252 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
11253 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11262 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
11266 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
11267 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11270 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11272 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11278 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11280 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr); in BuildBinOp()
11282 RHSExpr = resolvedRHS.get(); in BuildBinOp()
11288 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
11289 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11294 RHSExpr->getType()->isOverloadableType()) in BuildBinOp()
11295 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11299 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11890 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
11892 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
11914 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
11923 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc, in ActOnChooseExpr()