Lines Matching refs:LHSExpr
6117 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, in DiagnoseConditionalForNull() argument
6119 Expr *NullExpr = LHSExpr; in DiagnoseConditionalForNull()
6127 NonPointerExpr = LHSExpr; in DiagnoseConditionalForNull()
6177 Expr *LHSExpr = LHS.get(); in checkConditionalVoidType() local
6180 if (!LHSExpr->getType()->isVoidType()) in checkConditionalVoidType()
6184 S.Diag(LHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void) in checkConditionalVoidType()
6185 << LHSExpr->getSourceRange(); in checkConditionalVoidType()
6978 Expr *LHSExpr, in DiagnoseConditionalPrecedence() argument
7009 Expr *CondExpr, Expr *LHSExpr, in ActOnConditionalOp() argument
7016 ExprResult LHSResult = CorrectDelayedTyposInExpr(LHSExpr); in ActOnConditionalOp()
7022 if (LHSExpr) { in ActOnConditionalOp()
7031 LHSExpr = LHSResult.get(); in ActOnConditionalOp()
7039 if (!LHSExpr) { in ActOnConditionalOp()
7069 LHSExpr = CondExpr = opaqueValue; in ActOnConditionalOp()
7074 ExprResult Cond = CondExpr, LHS = LHSExpr, RHS = RHSExpr; in ActOnConditionalOp()
8094 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseArithmeticOnTwoVoidPointers() argument
8098 << 1 /* two pointers */ << LHSExpr->getSourceRange() in diagnoseArithmeticOnTwoVoidPointers()
8196 Expr *LHSExpr, Expr *RHSExpr) { in checkArithmeticBinOpPointerOperands() argument
8197 bool isLHSPointer = LHSExpr->getType()->isAnyPointerType(); in checkArithmeticBinOpPointerOperands()
8202 if (isLHSPointer) LHSPointeeTy = LHSExpr->getType()->getPointeeType(); in checkArithmeticBinOpPointerOperands()
8207 const PointerType *lhsPtr = LHSExpr->getType()->getAs<PointerType>(); in checkArithmeticBinOpPointerOperands()
8212 << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/ in checkArithmeticBinOpPointerOperands()
8213 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in checkArithmeticBinOpPointerOperands()
8222 if (!isRHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
8224 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
8232 if (!isRHSFuncPtr) diagnoseArithmeticOnFunctionPointer(S, Loc, LHSExpr); in checkArithmeticBinOpPointerOperands()
8235 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr); in checkArithmeticBinOpPointerOperands()
8240 if (isLHSPointer && checkArithmeticIncompletePointerType(S, Loc, LHSExpr)) in checkArithmeticBinOpPointerOperands()
8251 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusInt() argument
8252 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusInt()
8256 IndexExpr = LHSExpr; in diagnoseStringPlusInt()
8273 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusInt()
8281 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&") in diagnoseStringPlusInt()
8290 Expr *LHSExpr, Expr *RHSExpr) { in diagnoseStringPlusChar() argument
8291 const Expr *StringRefExpr = LHSExpr; in diagnoseStringPlusChar()
8296 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts()); in diagnoseStringPlusChar()
8314 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in diagnoseStringPlusChar()
8331 << FixItHint::CreateInsertion(LHSExpr->getLocStart(), "&") in diagnoseStringPlusChar()
8341 Expr *LHSExpr, Expr *RHSExpr) { in diagnosePointerIncompatibility() argument
8342 assert(LHSExpr->getType()->isAnyPointerType()); in diagnosePointerIncompatibility()
8345 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() in diagnosePointerIncompatibility()
9945 static void CheckIdentityFieldAssignment(Expr *LHSExpr, Expr *RHSExpr, in CheckIdentityFieldAssignment() argument
9949 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr); in CheckIdentityFieldAssignment()
9957 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr); in CheckIdentityFieldAssignment()
9968 QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, in CheckAssignmentOperands() argument
9971 assert(!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject)); in CheckAssignmentOperands()
9974 if (CheckForModifiableLvalue(LHSExpr, Loc, *this)) in CheckAssignmentOperands()
9977 QualType LHSType = LHSExpr->getType(); in CheckAssignmentOperands()
9984 CheckIdentityFieldAssignment(LHSExpr, RHSCheck, Loc, *this); in CheckAssignmentOperands()
10029 const Expr *InnerLHS = LHSExpr->IgnoreParenCasts(); in CheckAssignmentOperands()
10032 checkRetainCycles(LHSExpr, RHS.get()); in CheckAssignmentOperands()
10046 checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get()); in CheckAssignmentOperands()
10058 CheckForNullPointerDereference(*this, LHSExpr); in CheckAssignmentOperands()
10683 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, in DiagnoseSelfAssignment() argument
10689 LHSExpr = LHSExpr->IgnoreParenImpCasts(); in DiagnoseSelfAssignment()
10691 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr); in DiagnoseSelfAssignment()
10711 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); in DiagnoseSelfAssignment()
10774 Expr *LHSExpr, Expr *RHSExpr) { in CreateBuiltinBinOp() argument
10785 InitializedEntity::InitializeTemporary(LHSExpr->getType()); in CreateBuiltinBinOp()
10793 ExprResult LHS = LHSExpr, RHS = RHSExpr; in CreateBuiltinBinOp()
10805 LHS = CorrectDelayedTyposInExpr(LHSExpr); in CreateBuiltinBinOp()
10818 QualType LHSTy = LHSExpr->getType(); in CreateBuiltinBinOp()
10823 SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd()); in CreateBuiltinBinOp()
10990 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBitwisePrecedence() argument
10992 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr); in DiagnoseBitwisePrecedence()
11008 SourceRange DiagRange = isLeftComp ? SourceRange(LHSExpr->getLocStart(), in DiagnoseBitwisePrecedence()
11014 : SourceRange(LHSExpr->getLocStart(), RHSBO->getLHS()->getLocEnd()); in DiagnoseBitwisePrecedence()
11020 (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange()); in DiagnoseBitwisePrecedence()
11060 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrLHS() argument
11061 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) { in DiagnoseLogicalAndInLogicalOrLHS()
11082 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseLogicalAndInLogicalOrRHS() argument
11086 if (EvaluatesAsFalse(S, LHSExpr)) in DiagnoseLogicalAndInLogicalOrRHS()
11128 Expr *LHSExpr, Expr *RHSExpr) { in DiagnoseShiftCompare() argument
11129 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr); in DiagnoseShiftCompare()
11142 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() in DiagnoseShiftCompare()
11157 SourceLocation OpLoc, Expr *LHSExpr, in DiagnoseBinOpPrecedence() argument
11161 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11166 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr); in DiagnoseBinOpPrecedence()
11173 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11174 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11177 if ((Opc == BO_Shl && LHSExpr->getType()->isIntegralType(Self.getASTContext())) in DiagnoseBinOpPrecedence()
11180 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift); in DiagnoseBinOpPrecedence()
11187 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr); in DiagnoseBinOpPrecedence()
11193 Expr *LHSExpr, Expr *RHSExpr) { in ActOnBinOp() argument
11195 assert(LHSExpr && "ActOnBinOp(): missing left expression"); in ActOnBinOp()
11199 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr); in ActOnBinOp()
11201 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr); in ActOnBinOp()
11226 Expr *LHSExpr, Expr *RHSExpr) { in BuildBinOp() argument
11234 if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) { in BuildBinOp()
11238 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11253 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11256 ExprResult LHS = CheckPlaceholderExpr(LHSExpr); in BuildBinOp()
11258 LHSExpr = LHS.get(); in BuildBinOp()
11266 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
11267 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11269 if (LHSExpr->getType()->isOverloadableType()) in BuildBinOp()
11270 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11272 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11277 LHSExpr->getType()->isOverloadableType()) in BuildBinOp()
11278 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11288 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent()) in BuildBinOp()
11289 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11293 if (LHSExpr->getType()->isOverloadableType() || in BuildBinOp()
11295 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11299 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr); in BuildBinOp()
11890 Expr *LHSExpr, Expr *RHSExpr, in ActOnChooseExpr() argument
11892 assert((CondExpr && LHSExpr && RHSExpr) && "Missing type argument(s)"); in ActOnChooseExpr()
11914 Expr *ActiveExpr = CondIsTrue ? LHSExpr : RHSExpr; in ActOnChooseExpr()
11923 ChooseExpr(BuiltinLoc, CondExpr, LHSExpr, RHSExpr, resType, VK, OK, RPLoc, in ActOnChooseExpr()