Lines Matching defs:LHSExpr
4767 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
4769 Expr *NullExpr = LHSExpr;
4777 NonPointerExpr = LHSExpr;
4850 Expr *LHSExpr = LHS.get();
4853 if (!LHSExpr->getType()->isVoidType())
4857 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
4858 << LHSExpr->getSourceRange();
5383 Expr *LHSExpr,
5414 Expr *CondExpr, Expr *LHSExpr,
5420 if (LHSExpr == 0) {
5443 LHSExpr = CondExpr = opaqueValue;
5448 ExprResult Cond = Owned(CondExpr), LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
6303 Expr *LHSExpr, Expr *RHSExpr) {
6307 << 1 /* two pointers */ << LHSExpr->getSourceRange()
6398 Expr *LHSExpr, Expr *RHSExpr) {
6399 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
6404 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
6411 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
6413 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
6421 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
6424 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
6429 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr))
6440 Expr *LHSExpr, Expr *RHSExpr) {
6441 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
6445 IndexExpr = LHSExpr;
6462 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
6470 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&")
6479 Expr *LHSExpr, Expr *RHSExpr) {
6480 assert(LHSExpr->getType()->isAnyPointerType());
6483 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
7772 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
7776 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
7784 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
7795 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
7798 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
7801 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
7804 QualType LHSType = LHSExpr->getType();
7811 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this);
7856 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();
7859 checkRetainCycles(LHSExpr, RHS.get());
7875 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
7887 CheckForNullPointerDereference(*this, LHSExpr);
8366 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
8372 LHSExpr = LHSExpr->IgnoreParenImpCasts();
8374 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
8394 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
8402 Expr *LHSExpr, Expr *RHSExpr) {
8413 InitializedEntity::InitializeTemporary(LHSExpr->getType());
8421 ExprResult LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
8556 SourceLocation OpLoc, Expr *LHSExpr,
8558 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
8574 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(),
8580 : SourceRange(LHSExpr->getLocStart(), RHSBO->getLHS()->getLocStart());
8586 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
8639 Expr *LHSExpr, Expr *RHSExpr) {
8640 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
8661 Expr *LHSExpr, Expr *RHSExpr) {
8665 if (EvaluatesAsFalse(S, LHSExpr))
8700 SourceLocation OpLoc, Expr *LHSExpr,
8704 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
8708 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, LHSExpr);
8715 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
8716 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
8719 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext()))
8722 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
8730 Expr *LHSExpr, Expr *RHSExpr) {
8732 assert((LHSExpr != 0) && "ActOnBinOp(): missing left expression");
8736 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
8738 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
8763 Expr *LHSExpr, Expr *RHSExpr) {
8771 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
8775 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
8790 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8793 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
8795 LHSExpr = LHS.take();
8803 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8804 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8806 if (LHSExpr->getType()->isOverloadableType())
8807 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8809 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8814 LHSExpr->getType()->isOverloadableType())
8815 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8825 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8826 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8830 if (LHSExpr->getType()->isOverloadableType() ||
8832 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8836 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9416 Expr *LHSExpr, Expr *RHSExpr,
9418 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
9438 Expr *ActiveExpr = condEval.getZExtValue() ? LHSExpr : RHSExpr;
9446 return Owned(new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,