Home | History | Annotate | Download | only in Sema

Lines Matching refs:LHSExpr

5392 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
5394 Expr *NullExpr = LHSExpr;
5402 NonPointerExpr = LHSExpr;
5475 Expr *LHSExpr = LHS.get();
5478 if (!LHSExpr->getType()->isVoidType())
5482 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
5483 << LHSExpr->getSourceRange();
6038 Expr *LHSExpr,
6069 Expr *CondExpr, Expr *LHSExpr,
6075 if (!LHSExpr) {
6105 LHSExpr = CondExpr = opaqueValue;
6110 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr;
7019 Expr *LHSExpr, Expr *RHSExpr) {
7023 << 1 /* two pointers */ << LHSExpr->getSourceRange()
7114 Expr *LHSExpr, Expr *RHSExpr) {
7115 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
7120 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
7127 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
7129 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
7137 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
7140 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
7145 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr))
7156 Expr *LHSExpr, Expr *RHSExpr) {
7157 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
7161 IndexExpr = LHSExpr;
7178 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7186 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&")
7195 Expr *LHSExpr, Expr *RHSExpr) {
7197 dyn_cast<DeclRefExpr>(LHSExpr->IgnoreImpCasts());
7202 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts());
7219 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
7236 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&")
7246 Expr *LHSExpr, Expr *RHSExpr) {
7247 assert(LHSExpr->getType()->isAnyPointerType());
7250 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
8595 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
8599 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
8607 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
8618 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
8621 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
8624 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
8627 QualType LHSType = LHSExpr->getType();
8634 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this);
8679 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();
8682 checkRetainCycles(LHSExpr, RHS.get());
8696 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
8708 CheckForNullPointerDereference(*this, LHSExpr);
9231 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
9237 LHSExpr = LHSExpr->IgnoreParenImpCasts();
9239 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
9259 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
9310 Expr *LHSExpr, Expr *RHSExpr) {
9321 InitializedEntity::InitializeTemporary(LHSExpr->getType());
9329 ExprResult LHS = LHSExpr, RHS = RHSExpr;
9482 SourceLocation OpLoc, Expr *LHSExpr,
9484 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
9500 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(),
9506 : SourceRange(LHSExpr->getLocStart(), RHSBO->getLHS()->getLocStart());
9512 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
9567 Expr *LHSExpr, Expr *RHSExpr) {
9568 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
9589 Expr *LHSExpr, Expr *RHSExpr) {
9593 if (EvaluatesAsFalse(S, LHSExpr))
9626 Expr *LHSExpr, Expr *RHSExpr) {
9627 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr);
9640 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
9655 SourceLocation OpLoc, Expr *LHSExpr,
9659 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
9663 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, LHSExpr);
9670 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
9671 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
9674 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext()))
9677 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
9684 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
9690 Expr *LHSExpr, Expr *RHSExpr) {
9692 assert(LHSExpr && "ActOnBinOp(): missing left expression");
9696 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
9698 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
9723 Expr *LHSExpr, Expr *RHSExpr) {
9731 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
9735 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
9750 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9753 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
9755 LHSExpr = LHS.get();
9763 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9764 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9766 if (LHSExpr->getType()->isOverloadableType())
9767 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9769 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9774 LHSExpr->getType()->isOverloadableType())
9775 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9785 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9786 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9790 if (LHSExpr->getType()->isOverloadableType() ||
9792 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9796 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
10377 Expr *LHSExpr, Expr *RHSExpr,
10379 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
10401 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
10410 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc,