Home | History | Annotate | Download | only in Sema

Lines Matching refs:LHSExpr

5163 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
5165 Expr *NullExpr = LHSExpr;
5173 NonPointerExpr = LHSExpr;
5246 Expr *LHSExpr = LHS.get();
5249 if (!LHSExpr->getType()->isVoidType())
5253 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
5254 << LHSExpr->getSourceRange();
5778 Expr *LHSExpr,
5809 Expr *CondExpr, Expr *LHSExpr,
5815 if (LHSExpr == 0) {
5845 LHSExpr = CondExpr = opaqueValue;
5850 ExprResult Cond = Owned(CondExpr), LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
6721 Expr *LHSExpr, Expr *RHSExpr) {
6725 << 1 /* two pointers */ << LHSExpr->getSourceRange()
6816 Expr *LHSExpr, Expr *RHSExpr) {
6817 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
6822 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
6829 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
6831 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
6839 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
6842 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
6847 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr))
6858 Expr *LHSExpr, Expr *RHSExpr) {
6859 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
6863 IndexExpr = LHSExpr;
6880 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
6888 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&")
6897 Expr *LHSExpr, Expr *RHSExpr) {
6898 assert(LHSExpr->getType()->isAnyPointerType());
6901 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
8194 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr,
8198 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
8206 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
8217 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
8220 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
8223 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
8226 QualType LHSType = LHSExpr->getType();
8233 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this);
8278 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();
8281 checkRetainCycles(LHSExpr, RHS.get());
8297 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
8309 CheckForNullPointerDereference(*this, LHSExpr);
8798 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
8804 LHSExpr = LHSExpr->IgnoreParenImpCasts();
8806 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
8826 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
8877 Expr *LHSExpr, Expr *RHSExpr) {
8888 InitializedEntity::InitializeTemporary(LHSExpr->getType());
8896 ExprResult LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
9050 SourceLocation OpLoc, Expr *LHSExpr,
9052 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
9068 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(),
9074 : SourceRange(LHSExpr->getLocStart(), RHSBO->getLHS()->getLocStart());
9080 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());
9133 Expr *LHSExpr, Expr *RHSExpr) {
9134 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
9155 Expr *LHSExpr, Expr *RHSExpr) {
9159 if (EvaluatesAsFalse(S, LHSExpr))
9192 Expr *LHSExpr, Expr *RHSExpr) {
9193 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr);
9206 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange()
9221 SourceLocation OpLoc, Expr *LHSExpr,
9225 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
9229 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, LHSExpr);
9236 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
9237 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
9240 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext()))
9243 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
9250 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
9256 Expr *LHSExpr, Expr *RHSExpr) {
9258 assert((LHSExpr != 0) && "ActOnBinOp(): missing left expression");
9262 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
9264 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
9289 Expr *LHSExpr, Expr *RHSExpr) {
9297 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
9301 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
9316 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9319 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
9321 LHSExpr = LHS.take();
9329 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9330 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9332 if (LHSExpr->getType()->isOverloadableType())
9333 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9335 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9340 LHSExpr->getType()->isOverloadableType())
9341 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9351 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
9352 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9356 if (LHSExpr->getType()->isOverloadableType() ||
9358 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
9362 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
9942 Expr *LHSExpr, Expr *RHSExpr,
9944 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
9966 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr;
9974 return Owned(new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,