Home | History | Annotate | Download | only in Sema

Lines Matching refs:RHSExpr

4445 bool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
4448 Expr *NonPointerExpr = RHSExpr;
4454 NullExpr = RHSExpr;
4526 Expr *RHSExpr = RHS.get();
4529 S.Diag(RHSExpr->getLocStart(), diag::ext_typecheck_cond_one_void)
4530 << RHSExpr->getSourceRange();
4531 if (!RHSExpr->getType()->isVoidType())
5059 Expr *RHSExpr) {
5082 SourceRange(CondRHS->getLocStart(), RHSExpr->getLocEnd()));
5090 Expr *RHSExpr) {
5102 && commonExpr->getValueKind() == RHSExpr->getValueKind()
5105 && RHSExpr->isOrdinaryOrBitFieldObject()
5106 && Context.hasSameType(commonExpr->getType(), RHSExpr->getType()))) {
5123 ExprResult Cond = Owned(CondExpr), LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
5343 OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
5344 ExprResult RHSPtr = &RHSExpr;
5989 Expr *LHSExpr, Expr *RHSExpr) {
5994 << RHSExpr->getSourceRange();
6089 Expr *LHSExpr, Expr *RHSExpr) {
6091 bool isRHSPointer = RHSExpr->getType()->isAnyPointerType();
6096 if (isRHSPointer) RHSPointeeTy = RHSExpr->getType()->getPointeeType();
6103 else if (!isLHSVoidPtr) diagnoseArithmeticOnVoidPointer(S, Loc, RHSExpr);
6104 else diagnoseArithmeticOnTwoVoidPointers(S, Loc, LHSExpr, RHSExpr);
6114 RHSExpr);
6115 else diagnoseArithmeticOnTwoFunctionPointers(S, Loc, LHSExpr, RHSExpr);
6121 if (checkArithmeticIncompletePointerType(S, Loc, RHSExpr)) return false;
6143 Expr *LHSExpr, Expr *RHSExpr) {
6145 Expr* IndexExpr = RHSExpr;
6147 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
6165 SourceRange DiagRange(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
6170 if (IndexExpr == RHSExpr) {
6171 SourceLocation EndLoc = Self.PP.getLocForEndOfToken(RHSExpr->getLocEnd());
6182 Expr *LHSExpr, Expr *RHSExpr) {
6184 assert(RHSExpr->getType()->isAnyPointerType());
6186 << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange()
6187 << RHSExpr->getSourceRange();
7839 static void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr,
7846 RHSExpr = RHSExpr->IgnoreParenImpCasts();
7848 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
7867 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();
7875 Expr *LHSExpr, Expr *RHSExpr) {
7876 if (getLangOpts().CPlusPlus0x && isa<InitListExpr>(RHSExpr)) {
7884 InitializationKind::CreateDirectList(RHSExpr->getLocStart());
7887 InitializationSequence InitSeq(*this, Entity, Kind, &RHSExpr, 1);
7889 MultiExprArg(&RHSExpr, 1));
7892 RHSExpr = Init.take();
7895 ExprResult LHS = Owned(LHSExpr), RHS = Owned(RHSExpr);
8029 Expr *RHSExpr) {
8035 if (BinOp *BO = dyn_cast<BinOp>(RHSExpr))
8054 : SourceRange(OpLoc, RHSExpr->getLocEnd());
8059 RHSExpr->getLocEnd())
8061 cast<BinOp>(RHSExpr)->getLHS()->getLocStart());
8067 RHSExpr->getSourceRange());
8117 Expr *LHSExpr, Expr *RHSExpr) {
8121 if (EvaluatesAsFalse(S, RHSExpr))
8139 Expr *LHSExpr, Expr *RHSExpr) {
8140 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
8165 Expr *RHSExpr){
8168 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
8173 DiagnoseBitwiseAndInBitwiseOr(Self, OpLoc, RHSExpr);
8179 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
8180 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
8187 Expr *LHSExpr, Expr *RHSExpr) {
8190 assert((RHSExpr != 0) && "ActOnBinOp(): missing right expression");
8193 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
8195 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
8220 Expr *LHSExpr, Expr *RHSExpr) {
8232 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
8241 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
8243 RHSExpr = resolvedRHS.take();
8245 if (RHSExpr->isTypeDependent() ||
8246 RHSExpr->getType()->isOverloadableType())
8247 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8256 if (const BuiltinType *pty = RHSExpr->getType()->getAsPlaceholderType()) {
8260 RHSExpr->isTypeDependent())
8261 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8264 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8266 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8272 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8274 ExprResult resolvedRHS = CheckPlaceholderExpr(RHSExpr);
8276 RHSExpr = resolvedRHS.take();
8282 if (LHSExpr->isTypeDependent() || RHSExpr->isTypeDependent())
8283 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8288 RHSExpr->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,