Lines Matching refs:LHSExpr
5814 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, in DiagnoseConditionalForNull() argument
5816 Expr *NullExpr = LHSExpr; in DiagnoseConditionalForNull()
5824 NonPointerExpr = LHSExpr; in DiagnoseConditionalForNull()
5874 Expr *LHSExpr = LHS.get(); in checkConditionalVoidType() local
5877 if (!LHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
5881 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
5882 << LHSExpr->getSourceRange(); in checkConditionalVoidType()
6590 Expr *LHSExpr, in DiagnoseConditionalPrecedence() argument
6621 Expr *CondExpr, Expr *LHSExpr, in ActOnConditionalOp() argument
6636 if (!LHSExpr) { in ActOnConditionalOp()
6666 LHSExpr = CondExpr = opaqueValue; in ActOnConditionalOp()
6671 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
7658 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
7662 << 1 /* two pointers */ << LHSExpr->getSourceRange() in diagnoseArithmeticOnTwoVoidPointers()
7760 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
7761 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
7766 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
7771 const PointerType *lhsPtr = LHSExpr->getType()->getAs<PointerType>(); in checkArithmeticBinOpPointerOperands()
7776 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
7777 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
7786 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
7788 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
7796 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
7799 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
7804 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr)) in checkArithmeticBinOpPointerOperands()
7815 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
7816 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
7820 IndexExpr = LHSExpr; in diagnoseStringPlusInt()
7837 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
7845 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&") in diagnoseStringPlusInt()
7854 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
7855 const Expr *StringRefExpr = LHSExpr; in diagnoseStringPlusChar()
7860 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
7878 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
7895 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&") in diagnoseStringPlusChar()
7905 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
7906 assert(LHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
7909 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
9496 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
9500 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr); in CheckIdentityFieldAssignment()
9508 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr); in CheckIdentityFieldAssignment()
9519 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, in CheckAssignmentOperands() argument
9522 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject)); in CheckAssignmentOperands()
9525 if (CheckForModifiableLvalue(LHSExpr, Loc, *this)) in CheckAssignmentOperands()
9528 QualType LHSType = LHSExpr->getType(); in CheckAssignmentOperands()
9535 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this); in CheckAssignmentOperands()
9580 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts(); in CheckAssignmentOperands()
9583 checkRetainCycles(LHSExpr, RHS.get()); in CheckAssignmentOperands()
9597 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get()); in CheckAssignmentOperands()
9609 CheckForNullPointerDereference(*this, LHSExpr); in CheckAssignmentOperands()
10167 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
10173 LHSExpr = LHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
10175 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr); in DiagnoseSelfAssignment()
10195 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in DiagnoseSelfAssignment()
10258 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
10269 InitializedEntity::InitializeTemporary(LHSExpr->getType()); in CreateBuiltinBinOp()
10277 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
10289 LHS = CorrectDelayedTyposInExpr(LHSExpr); in CreateBuiltinBinOp()
10304 if (LHSExpr->getType()->isAtomicType() || in CreateBuiltinBinOp()
10306 SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in CreateBuiltinBinOp()
10463 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBitwisePrecedence() argument
10465 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr); in DiagnoseBitwisePrecedence()
10481 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(), in DiagnoseBitwisePrecedence()
10487 : SourceRange(LHSExpr->getLocStart(), RHSBO->getLHS()->getLocEnd()); in DiagnoseBitwisePrecedence()
10493 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
10533 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
10534 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) { in DiagnoseLogicalAndInLogicalOrLHS()
10555 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
10559 if (EvaluatesAsFalse(S, LHSExpr)) in DiagnoseLogicalAndInLogicalOrRHS()
10601 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
10602 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr); in DiagnoseShiftCompare()
10615 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
10630 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBinOpPrecedence() argument
10634 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10639 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr); in DiagnoseBinOpPrecedence()
10646 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10647 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10650 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext())) in DiagnoseBinOpPrecedence()
10653 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift); in DiagnoseBinOpPrecedence()
10660 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
10666 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
10668 assert(LHSExpr && "ActOnBinOp(): missing left expression"); in ActOnBinOp()
10672 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
10674 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
10699 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
10707 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
10711 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10726 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10729 ExprResult LHS = CheckPlaceholderExpr(LHSExpr); in BuildBinOp()
10731 LHSExpr = LHS.get(); in BuildBinOp()
10739 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
10740 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10742 if (LHSExpr->getType()->isOverloadableType()) in BuildBinOp()
10743 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10745 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10750 LHSExpr->getType()->isOverloadableType()) in BuildBinOp()
10751 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10761 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
10762 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10766 if (LHSExpr->getType()->isOverloadableType() || in BuildBinOp()
10768 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
10772 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11358 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
11360 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
11382 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
11391 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc, in ActOnChooseExpr()