Lines Matching refs:LHSExpr
7619 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, in DiagnoseConditionalForNull() argument
7621 Expr *NullExpr = LHSExpr; in DiagnoseConditionalForNull()
7629 NonPointerExpr = LHSExpr; in DiagnoseConditionalForNull()
7679 Expr *LHSExpr = LHS.get(); in checkConditionalVoidType() local
7682 if (!LHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
7686 S.Diag(LHSExpr->getBeginLoc(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
7687 << LHSExpr->getSourceRange(); in checkConditionalVoidType()
8524 Expr *LHSExpr, in DiagnoseConditionalPrecedence() argument
8613 Expr *CondExpr, Expr *LHSExpr, in ActOnConditionalOp() argument
8620 ExprResult LHSResult = CorrectDelayedTyposInExpr(LHSExpr); in ActOnConditionalOp()
8626 if (LHSExpr) { in ActOnConditionalOp()
8635 LHSExpr = LHSResult.get(); in ActOnConditionalOp()
8643 if (!LHSExpr) { in ActOnConditionalOp()
8683 LHSExpr = CondExpr = opaqueValue; in ActOnConditionalOp()
8686 QualType LHSTy = LHSExpr->getType(), RHSTy = RHSExpr->getType(); in ActOnConditionalOp()
8689 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
10233 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
10237 << 1 /* two pointers */ << LHSExpr->getSourceRange() in diagnoseArithmeticOnTwoVoidPointers()
10351 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
10352 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
10357 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
10365 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
10366 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
10375 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
10377 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
10385 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
10388 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
10393 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr)) in checkArithmeticBinOpPointerOperands()
10404 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
10405 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
10409 IndexExpr = LHSExpr; in diagnoseStringPlusInt()
10417 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in diagnoseStringPlusInt()
10425 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&") in diagnoseStringPlusInt()
10434 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
10435 const Expr *StringRefExpr = LHSExpr; in diagnoseStringPlusChar()
10440 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
10458 SourceRange DiagRange(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in diagnoseStringPlusChar()
10475 << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), "&") in diagnoseStringPlusChar()
10485 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
10486 assert(LHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
10489 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
12838 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
12847 if (LHSExpr->getExprLoc().isMacroID() || RHSExpr->getExprLoc().isMacroID()) in CheckIdentityFieldAssignment()
12851 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr); in CheckIdentityFieldAssignment()
12872 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr); in CheckIdentityFieldAssignment()
12883 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, in CheckAssignmentOperands() argument
12886 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject)); in CheckAssignmentOperands()
12889 if (CheckForModifiableLvalue(LHSExpr, Loc, *this)) in CheckAssignmentOperands()
12892 QualType LHSType = LHSExpr->getType(); in CheckAssignmentOperands()
12909 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this); in CheckAssignmentOperands()
12953 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts(); in CheckAssignmentOperands()
12956 checkRetainCycles(LHSExpr, RHS.get()); in CheckAssignmentOperands()
12975 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get()); in CheckAssignmentOperands()
12987 CheckForNullPointerDereference(*this, LHSExpr); in CheckAssignmentOperands()
12995 ExprEvalContexts.back().VolatileAssignmentLHSs.push_back(LHSExpr); in CheckAssignmentOperands()
13661 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
13669 LHSExpr = LHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
13671 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr); in DiagnoseSelfAssignment()
13691 << LHSDeclRef->getType() << LHSExpr->getSourceRange() in DiagnoseSelfAssignment()
13786 CorrectDelayedTyposInBinOp(Sema &S, BinaryOperatorKind Opc, Expr *LHSExpr, in CorrectDelayedTyposInBinOp() argument
13788 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CorrectDelayedTyposInBinOp()
13838 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
13849 InitializedEntity::InitializeTemporary(LHSExpr->getType()); in CreateBuiltinBinOp()
13857 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
13866 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr); in CreateBuiltinBinOp()
13871 QualType LHSTy = LHSExpr->getType(); in CreateBuiltinBinOp()
13876 SourceRange SR(LHSExpr->getBeginLoc(), RHSExpr->getEndLoc()); in CreateBuiltinBinOp()
14113 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBitwisePrecedence() argument
14115 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr); in DiagnoseBitwisePrecedence()
14132 ? SourceRange(LHSExpr->getBeginLoc(), OpLoc) in DiagnoseBitwisePrecedence()
14138 : SourceRange(LHSExpr->getBeginLoc(), RHSBO->getLHS()->getEndLoc()); in DiagnoseBitwisePrecedence()
14144 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
14184 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
14185 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) { in DiagnoseLogicalAndInLogicalOrLHS()
14206 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
14210 if (EvaluatesAsFalse(S, LHSExpr)) in DiagnoseLogicalAndInLogicalOrRHS()
14252 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
14253 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr); in DiagnoseShiftCompare()
14266 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
14280 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBinOpPrecedence() argument
14284 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14289 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr); in DiagnoseBinOpPrecedence()
14296 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14297 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14300 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext())) in DiagnoseBinOpPrecedence()
14303 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift); in DiagnoseBinOpPrecedence()
14310 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
14316 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
14318 assert(LHSExpr && "ActOnBinOp(): missing left expression"); in ActOnBinOp()
14322 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
14324 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
14370 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
14372 std::tie(LHS, RHS) = CorrectDelayedTyposInBinOp(*this, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14375 LHSExpr = LHS.get(); in BuildBinOp()
14385 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
14389 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14404 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14416 auto *OE = dyn_cast<OverloadExpr>(LHSExpr); in BuildBinOp()
14429 ExprResult LHS = CheckPlaceholderExpr(LHSExpr); in BuildBinOp()
14431 LHSExpr = LHS.get(); in BuildBinOp()
14440 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent() || in BuildBinOp()
14441 LHSExpr->getType()->isOverloadableType())) in BuildBinOp()
14442 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14444 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14449 LHSExpr->getType()->isOverloadableType()) in BuildBinOp()
14450 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14460 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
14461 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14465 if (LHSExpr->getType()->isOverloadableType() || in BuildBinOp()
14467 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
14471 (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())) { in BuildBinOp()
14473 assert((LHSExpr->containsErrors() || RHSExpr->containsErrors()) && in BuildBinOp()
14480 Context, LHSExpr, RHSExpr, Opc, in BuildBinOp()
14481 LHSExpr->getType().getUnqualifiedType(), VK_RValue, OK_Ordinary, in BuildBinOp()
14486 ResultType = LHSExpr->getType().getUnqualifiedType(); in BuildBinOp()
14506 return BinaryOperator::Create(Context, LHSExpr, RHSExpr, Opc, ResultType, in BuildBinOp()
14512 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
15117 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
15119 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
15138 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
15145 return new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, in ActOnChooseExpr()