Lines Matching defs:LHSExpr

7929 bool Sema::DiagnoseConditionalForNull(const Expr *LHSExpr, const Expr *RHSExpr,
7931 const Expr *NullExpr = LHSExpr;
7939 NonPointerExpr = LHSExpr;
8711 Expr *Condition, const Expr *LHSExpr,
8797 Expr *CondExpr, Expr *LHSExpr,
8804 ExprResult LHSResult = CorrectDelayedTyposInExpr(LHSExpr);
8810 if (LHSExpr) {
8819 LHSExpr = LHSResult.get();
8827 if (!LHSExpr) {
8867 LHSExpr = CondExpr = opaqueValue;
8870 QualType LHSTy = LHSExpr->getType(), RHSTy = RHSExpr->getType();
8873 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
10683 Expr *LHSExpr, Expr *RHSExpr) {
10687 << 1 /* two pointers */ << LHSExpr->getSourceRange()
10819 Expr *LHSExpr, Expr *RHSExpr) {
10820 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
10825 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
10834 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/
10835 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
10844 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
10846 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
10854 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
10857 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
10862 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr))
10873 Expr *LHSExpr, Expr *RHSExpr) {
10874 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
10878 IndexExpr = LHSExpr;
10886 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10894 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&")
10903 Expr *LHSExpr, Expr *RHSExpr) {
10904 const Expr *StringRefExpr = LHSExpr;
10909 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts());
10927 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
10944 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&")
10954 Expr *LHSExpr, Expr *RHSExpr) {
10955 assert(LHSExpr->getType()->isAnyPointerType());
10958 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
13697 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
13706 if (LHSExpr->getExprLoc().isMacroID() || RHSExpr->getExprLoc().isMacroID())
13710 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
13731 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
13742 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
13746 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
13749 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
13752 QualType LHSType = LHSExpr->getType();
13776 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this);
13820 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();
13823 ObjC().checkRetainCycles(LHSExpr, RHS.get());
13842 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
13854 CheckForNullPointerDereference(*this, LHSExpr);
13856 AssignedEntity AE{LHSExpr};
13865 ExprEvalContexts.back().VolatileAssignmentLHSs.push_back(LHSExpr);
14614 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
14622 LHSExpr = LHSExpr->IgnoreParenImpCasts();
14624 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
14644 << LHSDeclRef->getType() << LHSExpr->getSourceRange()
14745 CorrectDelayedTyposInBinOp(Sema &S, BinaryOperatorKind Opc, Expr *LHSExpr,
14747 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14794 Expr *LHSExpr, Expr *RHSExpr) {
14805 InitializedEntity::InitializeTemporary(LHSExpr->getType());
14813 ExprResult LHS = LHSExpr, RHS = RHSExpr;
14822 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr);
14827 QualType LHSTy = LHSExpr->getType();
14832 SourceRange SR(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc());
14851 checkTypeSupport(LHSExpr->getType(), OpLoc, /*ValueDecl*/ nullptr);
14924 if (const auto *BI = dyn_cast<BinaryOperator>(LHSExpr);
15083 SourceLocation OpLoc, Expr *LHSExpr,
15085 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
15102 ? SourceRange(LHSExpr->getBeginLoc(), OpLoc)
15108 : SourceRange(LHSExpr->getBeginLoc(), RHSBO->getLHS()->getEndLoc());
15114 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
15138 Expr *LHSExpr, Expr *RHSExpr) {
15139 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
15159 Expr *LHSExpr, Expr *RHSExpr) {
15203 Expr *LHSExpr, Expr *RHSExpr) {
15204 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr);
15217 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
15231 SourceLocation OpLoc, Expr *LHSExpr,
15235 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
15240 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr);
15247 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
15248 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
15251 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext()))
15254 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
15261 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
15297 Expr *LHSExpr, Expr *RHSExpr) {
15299 assert(LHSExpr && "ActOnBinOp(): missing left expression");
15303 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
15308 DetectPrecisionLossInComplexDivision(*this, TokLoc, LHSExpr);
15313 CheckInvalidBuiltinCountedByRef(LHSExpr, K);
15316 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
15371 Expr *LHSExpr, Expr *RHSExpr) {
15373 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr);
15376 LHSExpr = LHS.get();
15386 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
15390 return PseudoObject().checkAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
15405 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15417 auto *OE = dyn_cast<OverloadExpr>(LHSExpr);
15430 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
15432 LHSExpr = LHS.get();
15441 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15442 LHSExpr->getType()->isOverloadableType()))
15443 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15445 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15450 LHSExpr->getType()->isOverloadableType())
15451 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15461 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() ||
15462 LHSExpr->getType()->isOverloadableType() ||
15464 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15468 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())) {
15470 assert((LHSExpr->containsErrors() || RHSExpr->containsErrors()) &&
15477 Context, LHSExpr, RHSExpr, Opc,
15478 LHSExpr->getType().getUnqualifiedType(), VK_PRValue, OK_Ordinary,
15483 ResultType = LHSExpr->getType().getUnqualifiedType();
15503 return BinaryOperator::Create(Context, LHSExpr, RHSExpr, Opc, ResultType,
15509 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
16141 Expr *LHSExpr, Expr *RHSExpr,
16143 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
16161 // If the condition is > zero, then the AST type is the same as the LHSExpr.
16162 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
16169 return new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,