Home | History | Annotate | Download | only in Sema

Lines Matching refs:LHSExpr

4445 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
4447 Expr *NullExpr = LHSExpr;
4455 NonPointerExpr = LHSExpr;
4525 Expr *LHSExpr = LHS.get();
4528 if (!LHSExpr->getType()->isVoidType())
4532 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
4533 << LHSExpr->getSourceRange();
5058 Expr *LHSExpr,
5089 Expr *CondExpr, Expr *LHSExpr,
5095 if (LHSExpr == 0) {
5118 LHSExpr = CondExpr = opaqueValue;
5123 ExprResult Cond = Owned(CondExpr), LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
5989 Expr *LHSExpr, Expr *RHSExpr) {
5993 << 1 /* two pointers */ << LHSExpr->getSourceRange()
6089 Expr *LHSExpr, Expr *RHSExpr) {
6090 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType();
6095 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType();
6102 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr);
6104 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
6112 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr);
6115 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
6120 if (checkArithmeticIncompletePointerType(S, Loc, LHSExpr)) return false;
6143 Expr *LHSExpr, Expr *RHSExpr) {
6144 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
6148 IndexExpr = LHSExpr;
6165 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
6173 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&")
6182 Expr *LHSExpr, Expr *RHSExpr) {
6183 assert(LHSExpr->getType()->isAnyPointerType());
6186 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
7303 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
7306 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject));
7309 if (CheckForModifiableLvalue(LHSExpr, Loc, *this))
7312 QualType LHSType = LHSExpr->getType();
7358 checkRetainCycles(LHSExpr, RHS.get());
7360 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get());
7371 CheckForNullPointerDereference(*this, LHSExpr);
7839 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
7845 LHSExpr = LHSExpr->IgnoreParenImpCasts();
7847 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
7867 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
7875 Expr *LHSExpr, Expr *RHSExpr) {
7886 InitializedEntity::InitializeTemporary(LHSExpr->getType());
7895 ExprResult LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
8028 SourceLocation OpLoc, Expr *LHSExpr,
8033 if (BinOp *BO = dyn_cast<BinOp>(LHSExpr))
8052 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(),
8058 SourceRange(cast<BinOp>(LHSExpr)->getRHS()->getLocStart(),
8060 : SourceRange(LHSExpr->getLocStart(),
8117 Expr *LHSExpr, Expr *RHSExpr) {
8118 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
8139 Expr *LHSExpr, Expr *RHSExpr) {
8143 if (EvaluatesAsFalse(S, LHSExpr))
8164 SourceLocation OpLoc, Expr *LHSExpr,
8168 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
8172 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, LHSExpr);
8179 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
8180 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
8187 Expr *LHSExpr, Expr *RHSExpr) {
8189 assert((LHSExpr != 0) && "ActOnBinOp(): missing left expression");
8193 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
8195 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
8220 Expr *LHSExpr, Expr *RHSExpr) {
8228 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {
8232 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
8247 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8250 ExprResult LHS = CheckPlaceholderExpr(LHSExpr);
8252 LHSExpr = LHS.take();
8260 LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8261 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8263 if (LHSExpr->getType()->isOverloadableType())
8264 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8266 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8271 LHSExpr->getType()->isOverloadableType())
8272 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8282 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8283 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8287 if (LHSExpr->getType()->isOverloadableType() ||
8289 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8293 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8839 Expr *LHSExpr, Expr *RHSExpr,
8841 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)");
8860 Expr *ActiveExpr = condEval.getZExtValue() ? LHSExpr : RHSExpr;
8868 return Owned(new (Context) ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr,