Lines Matching defs:LHSExpr
7841 bool Sema::DiagnoseConditionalForNull(const Expr *LHSExpr, const Expr *RHSExpr,
7843 const Expr *NullExpr = LHSExpr;
7851 NonPointerExpr = LHSExpr;
8618 Expr *Condition, const Expr *LHSExpr,
8705 Expr *CondExpr, Expr *LHSExpr,
8712 ExprResult LHSResult = CorrectDelayedTyposInExpr(LHSExpr);
8718 if (LHSExpr) {
8727 LHSExpr = LHSResult.get();
8735 if (!LHSExpr) {
8775 LHSExpr = CondExpr = opaqueValue;
8778 QualType LHSTy = LHSExpr->getType(), RHSTy = RHSExpr->getType();
8781 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
10565 Expr *LHSExpr, Expr *RHSExpr) {
10569 << 1 /* two pointers */ << LHSExpr->getSourceRange()
10701 Expr *LHSExpr, Expr *RHSExpr) {
10702 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
10707 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
10715 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/
10716 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
10725 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
10727 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
10735 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
10738 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
10743 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr))
10754 Expr *LHSExpr, Expr *RHSExpr) {
10755 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
10759 IndexExpr = LHSExpr;
10767 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10775 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&")
10784 Expr *LHSExpr, Expr *RHSExpr) {
10785 const Expr *StringRefExpr = LHSExpr;
10790 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts());
10808 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10825 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&")
10835 Expr *LHSExpr, Expr *RHSExpr) {
10836 assert(LHSExpr->getType()->isAnyPointerType());
10839 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
13494 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
13503 if (LHSExpr->getExprLoc().isMacroID() || RHSExpr->getExprLoc().isMacroID())
13507 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
13528 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
13539 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
13543 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
13546 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
13549 QualType LHSType = LHSExpr->getType();
13573 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this);
13617 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();
13620 ObjC().checkRetainCycles(LHSExpr, RHS.get());
13639 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
13651 CheckForNullPointerDereference(*this, LHSExpr);
13653 AssignedEntity AE{LHSExpr};
13662 ExprEvalContexts.back().VolatileAssignmentLHSs.push_back(LHSExpr);
14411 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
14419 LHSExpr = LHSExpr->IgnoreParenImpCasts();
14421 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
14441 << LHSDeclRef->getType() << LHSExpr->getSourceRange()
14542 CorrectDelayedTyposInBinOp(Sema &S, BinaryOperatorKind Opc, Expr *LHSExpr,
14544 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14591 Expr *LHSExpr, Expr *RHSExpr) {
14602 InitializedEntity::InitializeTemporary(LHSExpr->getType());
14610 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14619 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr);
14624 QualType LHSTy = LHSExpr->getType();
14629 SourceRange SR(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
14648 checkTypeSupport(LHSExpr->getType(), OpLoc, /*ValueDecl*/ nullptr);
14721 if (const auto *BI = dyn_cast<BinaryOperator>(LHSExpr);
14880 SourceLocation OpLoc, Expr *LHSExpr,
14882 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
14899 ? SourceRange(LHSExpr->getBeginLoc(), OpLoc)
14905 : SourceRange(LHSExpr->getBeginLoc(), RHSBO->getLHS()->getEndLoc());
14911 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
14935 Expr *LHSExpr, Expr *RHSExpr) {
14936 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
14956 Expr *LHSExpr, Expr *RHSExpr) {
15000 Expr *LHSExpr, Expr *RHSExpr) {
15001 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr);
15014 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
15028 SourceLocation OpLoc, Expr *LHSExpr,
15032 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
15037 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr);
15044 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
15045 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
15048 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext()))
15051 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
15058 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
15063 Expr *LHSExpr, Expr *RHSExpr) {
15065 assert(LHSExpr && "ActOnBinOp(): missing left 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);
15131 LHSExpr = LHS.get();
15141 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
15145 return PseudoObject().checkAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
15160 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15172 auto *OE = dyn_cast<OverloadExpr>(LHSExpr);
15185 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
15187 LHSExpr = LHS.get();
15196 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15197 LHSExpr->getType()->isOverloadableType()))
15198 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15200 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15205 LHSExpr->getType()->isOverloadableType())
15206 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15216 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15217 LHSExpr->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,
15233 LHSExpr->getType().getUnqualifiedType(), VK_PRValue, OK_Ordinary,
15238 ResultType = LHSExpr->getType().getUnqualifiedType();
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)");
15916 // If the condition is > zero, then the AST type is the same as the LHSExpr.
15917 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
15924 return new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,