1 write to Right
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
1632this.Right = right;
132 references to Right
Microsoft.CodeAnalysis.CSharp (132)
Binder\Binder.ValueChecks.cs (7)
230ArgsOpt = [binaryOperator.Left, binaryOperator.Right], 244ArgsOpt = [logicalOperator.Left, logicalOperator.Right], 4646.Intersect(GetValEscape(binary.Right, localScopeDepth)); 5409CheckValEscape(binary.Right.Syntax, binary.Right, escapeFrom, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 5805scope = scope.Intersect(GetValEscapeOfInterpolatedStringHandlerCalls(binary.Right, localScopeDepth)); 5845if (!CheckValEscapeOfInterpolatedStringHandlerCalls(binary.Right, escapeFrom, escapeTo, diagnostics))
Binder\Binder_Operators.cs (2)
1230var right = current.Right switch 1234_ => throw ExceptionUtilities.UnexpectedValue(current.Right.Kind)
Binder\Binder_TupleOperators.cs (1)
111return new TupleBinaryOperatorInfo.Single(binary.Left.Type, binary.Right.Type, binary.OperatorKind, binary.Method, binary.ConstrainedToType,
BoundTree\BoundNode_Source.cs (1)
358appendSource(binary.Right);
BoundTree\BoundNodeExtensions.cs (4)
134switch (current.Right) 146throw ExceptionUtilities.UnexpectedValue(current.Right.Kind); 221var rewrittenRight = currentBinary.Right switch 225_ => throw ExceptionUtilities.UnexpectedValue(currentBinary.Right.Kind)
BoundTree\BoundTreeRewriter.cs (2)
252return node.Update(node.OperatorKind, VisitBinaryOperatorData(node), node.ResultKind, (BoundExpression)this.Visit(node.Left), (BoundExpression)this.Visit(node.Right), this.VisitType(node.Type)); 279var right = (BoundExpression?)this.Visit(binary.Right);
BoundTree\BoundTreeWalker.cs (3)
114rightOperands.Push(node.Right); 117rightOperands.Push(binary.Right); 125rightOperands.Push(binary.Right);
BoundTree\Constructors.cs (1)
453return Update(OperatorKind, uncommonData, ResultKind, Left, Right, Type);
BoundTree\NullabilityRewriter.cs (1)
95var right = (BoundExpression)Visit(currentBinary.Right);
CodeGen\EmitExpression.cs (1)
2183if (b.OperatorKind.IsUserDefined() || !isSafeToDereferenceReceiverRefAfterEvaluatingArgument(b.Right))
CodeGen\EmitOperators.cs (19)
73EmitExpression(expression.Right, false); 138EmitExpression(binary.Right, true); 160EmitExpression(expression.Right, true); 267EmitCondExpr(condition.Right, sense); 306Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 315Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 332Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 333EmitBinaryCondOperatorHelper(ILOpCode.And, binOp.Left, binOp.Right, sense); 338Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 339EmitBinaryCondOperatorHelper(ILOpCode.Or, binOp.Left, binOp.Right, sense); 344Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 348EmitBinaryCondOperatorHelper(ILOpCode.Xor, binOp.Left, binOp.Right, true); 350EmitBinaryCondOperatorHelper(ILOpCode.Ceq, binOp.Left, binOp.Right, true); 361var comparand = binOp.Right; 416EmitBinaryCondOperatorHelper(ILOpCode.Ceq, binOp.Left, binOp.Right, sense); 450EmitBinaryCondOperatorHelper(s_compOpCodes[opIdx], binOp.Left, binOp.Right, sense); 659Debug.Assert(TypeSymbol.Equals(expression.Left.Type, expression.Right.Type, TypeCompareKind.ConsiderEverything2)); 664enumType = expression.Right.Type; 789return IsUnsigned(Binder.GetEnumPromotedType(op.Right.Type.GetEnumUnderlyingType().SpecialType));
CodeGen\EmitStatement.cs (6)
240nonConstOp = condition.Right; 244constOp = (condition.Right.ConstantValueOpt != null) ? condition.Right : null; 457stack.Push((binary.Right, top.destBox, top.sense)); 466stack.Push((binary.Right, top.destBox, top.sense)); 514EmitExpression(binOp.Right, true);
CodeGen\Optimizer.cs (3)
1528var right = (BoundExpression)this.Visit(binary.Right); 1566BoundExpression right = (BoundExpression)this.Visit(node.Right); 2109var right = (BoundExpression)this.Visit(binary.Right);
Compilation\CSharpSemanticModel.cs (3)
3871((binaryOperator.Left.IsLiteralNull() && binaryOperator.Right.Type.IsNullableType()) || 3872(binaryOperator.Right.IsLiteralNull() && binaryOperator.Left.Type.IsNullableType())) && 3887binaryOperator.Right.Type,
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
198stack.Push(binOp.Right); 209stack.Push(binOp.Right);
FlowAnalysis\AbstractFlowPass.cs (11)
2491right = binOp.Right; 2496right = udBinOp.Right; 2593&& isKnownNullOrNotNull(binary.Right)) 2602VisitRvalue(binary.Right); 2617VisitRvalue(binary.Right); 2621var isNullConstant = binary.Right.ConstantValueOpt?.IsNull == true; 2641VisitRvalue(binary.Right); 2674if (isKnownNullOrNotNull(binary.Left) && TryVisitConditionalAccess(binary.Right, out var stateWhenNotNull)) 2684else if (IsConditionalState && binary.Right.ConstantValueOpt is { IsBoolean: true } rightConstant) 2688Visit(binary.Right); 2699Visit(binary.Right);
FlowAnalysis\NullableWalker.cs (17)
5120var (rightOperand, rightConversion) = RemoveConversion(binary.Right, includeExplicitConversions: false); 5225var (rightOperand, rightConversion) = RemoveConversion(binary.Right, includeExplicitConversions: false); 5249if (IsConditionalState && binary.Right.ConstantValueOpt is { IsBoolean: true } rightConstant) 5253Visit(binary.Right); 5254UseRvalueOnly(binary.Right); // record result for the right 5263Visit(binary.Right); 5264UseRvalueOnly(binary.Right); 5291var inferredResult = ReinferAndVisitBinaryOperator(binary, binary.OperatorKind, binary.Method, binary.Type, binary.Left, leftOperand, leftConversion, leftType, binary.Right, rightOperand, rightConversion, rightType); 5495var (rightOperand, rightConversion) = RemoveConversion(binary.Right, includeExplicitConversions: false); 5507if (binary.Right.ConstantValueOpt?.IsNull == true) 5513operandComparedToNull = binary.Right; 5532operandComparedToNonNull = binary.Right; 12156Visit(node.Right); 12159AfterRightChildOfBinaryLogicalOperatorHasBeenVisited(node.Right, isAnd, isBool, ref leftTrue, ref leftFalse); 12176var (rightOperand, rightConversion) = RemoveConversion(binary.Right, includeExplicitConversions: false); 12228rightType = VisitBinaryOperatorOperandConversion(binary.Right, rightOperand, rightConversion, parameters[1], rightUnderlyingType, isLifted, out _); 12232AfterRightChildOfBinaryLogicalOperatorHasBeenVisited(binary.Right, isAnd, isBool, ref leftTrue, ref leftFalse);
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
307Visit(node.Right);
Generated\BoundNodes.xml.Generated.cs (8)
1664if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1755if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || trueFalseOperandPlaceholder != this.TrueFalseOperandPlaceholder || trueFalseOperandConversion != this.TrueFalseOperandConversion || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 9945this.Visit(node.Right); 9957this.Visit(node.Right); 11076BoundExpression right = (BoundExpression)this.Visit(node.Right); 11096BoundExpression right = (BoundExpression)this.Visit(node.Right); 15471new TreeDumperNode("right", null, new TreeDumperNode[] { Visit(node.Right, null) }), 15500new TreeDumperNode("right", null, new TreeDumperNode[] { Visit(node.Right, null) }),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
195return VisitBinaryOperator(binOp.OperatorKind, binOp.Method, binOp.Type, binOp.Left, binOp.Right); 198return VisitBinaryOperator(userDefCondLogOp.OperatorKind, userDefCondLogOp.LogicalOperator, userDefCondLogOp.Type, userDefCondLogOp.Left, userDefCondLogOp.Right);
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
708Visit(current.Right);
Lowering\DiagnosticsPass_Warnings.cs (27)
269CheckUnsafeType(node.Right); 272CheckForBitwiseOrSignExtend(node, node.OperatorKind, node.Left, node.Right); 317if (node.Left.ConstantValueOpt != null && node.Right.ConstantValueOpt == null && node.Right.Kind == BoundKind.Conversion) 319CheckVacuousComparisons(node, node.Left.ConstantValueOpt, node.Right); 322if (node.Right.ConstantValueOpt != null && node.Left.ConstantValueOpt == null && node.Left.Kind == BoundKind.Conversion) 324CheckVacuousComparisons(node, node.Right.ConstantValueOpt, node.Left); 330if (node.Left.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Left) && !(node.Left.ConstantValueOpt != null && node.Left.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Right, out t)) 335else if (node.Right.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Right) && !(node.Right.ConstantValueOpt != null && node.Right.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Left, out t)) 386if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.Right)) 768if (node.Right.IsLiteralNull() && node.Left.NullableAlwaysHasValue()) 772else if (node.Left.IsLiteralNull() && node.Right.NullableAlwaysHasValue()) 774Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), node.Right.Type); 798if (node.Right.NullableNeverHasValue()) 800Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.Right)); 816if (node.Right.NullableNeverHasValue() && node.Left.NullableAlwaysHasValue()) 818Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Right)); 820else if (node.Left.NullableNeverHasValue() && node.Right.NullableAlwaysHasValue()) 822Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Left)); 828if ((node.Left.NullableNeverHasValue() && node.Right.IsNullableNonBoolean()) || 829(node.Left.IsNullableNonBoolean() && node.Right.NullableNeverHasValue())) 834if (node.Right.NullableNeverHasValue() || node.Left.NullableNeverHasValue()) 845if (node.Right.NullableNeverHasValue() || node.Left.NullableNeverHasValue())
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
76BoundExpression loweredRight = VisitExpression(node.Right); 158BoundExpression loweredRight = VisitExpression(original.Right);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
195stack.Push(utf8Addition.Right);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (3)
233if (shouldRecurse(binaryOperator.Right, out var right)) 239self.VisitAndAddConcatArgumentInReverseOrder(binaryOperator.Right, argumentAlreadyVisited: false, arguments, ref concatMethods); 554var right = VisitExpression(current.Right);
Lowering\SpillSequenceSpiller.cs (1)
994var right = VisitExpression(ref builder, node.Right);
Operations\CSharpOperationFactory.cs (2)
1470IOperation right = Create(currentBinary.Right); 2441var right = createContent(binaryOperator.Right);