1 write to Right
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
1632
this.
Right
= right;
132 references to Right
Microsoft.CodeAnalysis.CSharp (132)
Binder\Binder.ValueChecks.cs (7)
231
ArgsOpt = [binaryOperator.Left, binaryOperator.
Right
],
245
ArgsOpt = [logicalOperator.Left, logicalOperator.
Right
],
4686
.Intersect(GetValEscape(binary.
Right
, localScopeDepth));
5461
CheckValEscape(binary.
Right
.Syntax, binary.
Right
, escapeFrom, escapeTo, checkingReceiver: false, diagnostics: diagnostics);
5857
scope = scope.Intersect(GetValEscapeOfInterpolatedStringHandlerCalls(binary.
Right
, localScopeDepth));
5897
if (!CheckValEscapeOfInterpolatedStringHandlerCalls(binary.
Right
, escapeFrom, escapeTo, diagnostics))
Binder\Binder_Operators.cs (2)
1237
var right = current.
Right
switch
1241
_ => throw ExceptionUtilities.UnexpectedValue(current.
Right
.Kind)
Binder\Binder_TupleOperators.cs (1)
112
return new TupleBinaryOperatorInfo.Single(binary.Left.Type, binary.
Right
.Type, binary.OperatorKind, binary.BinaryOperatorMethod, binary.ConstrainedToType,
BoundTree\BoundNode_Source.cs (1)
346
appendSource(binary.
Right
);
BoundTree\BoundNodeExtensions.cs (4)
134
switch (current.
Right
)
146
throw ExceptionUtilities.UnexpectedValue(current.
Right
.Kind);
221
var rewrittenRight = currentBinary.
Right
switch
225
_ => throw ExceptionUtilities.UnexpectedValue(currentBinary.
Right
.Kind)
BoundTree\BoundTreeRewriter.cs (2)
252
return node.Update(node.OperatorKind, VisitBinaryOperatorData(node), node.ResultKind, (BoundExpression)this.Visit(node.Left), (BoundExpression)this.Visit(node.
Right
), this.VisitType(node.Type));
279
var right = (BoundExpression?)this.Visit(binary.
Right
);
BoundTree\BoundTreeWalker.cs (3)
114
rightOperands.Push(node.
Right
);
117
rightOperands.Push(binary.
Right
);
125
rightOperands.Push(binary.
Right
);
BoundTree\Constructors.cs (1)
460
return Update(OperatorKind, uncommonData, ResultKind, Left,
Right
, Type);
BoundTree\NullabilityRewriter.cs (1)
95
var right = (BoundExpression)Visit(currentBinary.
Right
);
CodeGen\EmitExpression.cs (1)
2183
if (b.OperatorKind.IsUserDefined() || !isSafeToDereferenceReceiverRefAfterEvaluatingArgument(b.
Right
))
CodeGen\EmitOperators.cs (19)
73
EmitExpression(expression.
Right
, false);
138
EmitExpression(binary.
Right
, true);
160
EmitExpression(expression.
Right
, true);
267
EmitCondExpr(condition.
Right
, sense);
306
Debug.Assert(binOp.
Right
.Type.SpecialType == SpecialType.System_Boolean);
315
Debug.Assert(binOp.
Right
.Type.SpecialType == SpecialType.System_Boolean);
332
Debug.Assert(binOp.
Right
.Type.SpecialType == SpecialType.System_Boolean);
333
EmitBinaryCondOperatorHelper(ILOpCode.And, binOp.Left, binOp.
Right
, sense);
338
Debug.Assert(binOp.
Right
.Type.SpecialType == SpecialType.System_Boolean);
339
EmitBinaryCondOperatorHelper(ILOpCode.Or, binOp.Left, binOp.
Right
, sense);
344
Debug.Assert(binOp.
Right
.Type.SpecialType == SpecialType.System_Boolean);
348
EmitBinaryCondOperatorHelper(ILOpCode.Xor, binOp.Left, binOp.
Right
, true);
350
EmitBinaryCondOperatorHelper(ILOpCode.Ceq, binOp.Left, binOp.
Right
, true);
361
var comparand = binOp.
Right
;
416
EmitBinaryCondOperatorHelper(ILOpCode.Ceq, binOp.Left, binOp.
Right
, sense);
450
EmitBinaryCondOperatorHelper(s_compOpCodes[opIdx], binOp.Left, binOp.
Right
, sense);
659
Debug.Assert(TypeSymbol.Equals(expression.Left.Type, expression.
Right
.Type, TypeCompareKind.ConsiderEverything2));
664
enumType = expression.
Right
.Type;
789
return IsUnsigned(Binder.GetEnumPromotedType(op.
Right
.Type.GetEnumUnderlyingType().SpecialType));
CodeGen\EmitStatement.cs (6)
240
nonConstOp = condition.
Right
;
244
constOp = (condition.
Right
.ConstantValueOpt != null) ? condition.
Right
: null;
457
stack.Push((binary.
Right
, top.destBox, top.sense));
466
stack.Push((binary.
Right
, top.destBox, top.sense));
514
EmitExpression(binOp.
Right
, true);
CodeGen\Optimizer.cs (3)
1528
var right = (BoundExpression)this.Visit(binary.
Right
);
1567
BoundExpression right = (BoundExpression)this.Visit(node.
Right
);
2111
var right = (BoundExpression)this.Visit(binary.
Right
);
Compilation\CSharpSemanticModel.cs (3)
3866
((binaryOperator.Left.IsLiteralNull() && binaryOperator.
Right
.Type.IsNullableType()) ||
3867
(binaryOperator.
Right
.IsLiteralNull() && binaryOperator.Left.Type.IsNullableType())) &&
3882
binaryOperator.
Right
.Type,
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
198
stack.Push(binOp.
Right
);
209
stack.Push(binOp.
Right
);
FlowAnalysis\AbstractFlowPass.cs (11)
2492
right = binOp.
Right
;
2497
right = udBinOp.
Right
;
2594
&& isKnownNullOrNotNull(binary.
Right
))
2603
VisitRvalue(binary.
Right
);
2618
VisitRvalue(binary.
Right
);
2622
var isNullConstant = binary.
Right
.ConstantValueOpt?.IsNull == true;
2642
VisitRvalue(binary.
Right
);
2675
if (isKnownNullOrNotNull(binary.Left) && TryVisitConditionalAccess(binary.
Right
, out var stateWhenNotNull))
2685
else if (IsConditionalState && binary.
Right
.ConstantValueOpt is { IsBoolean: true } rightConstant)
2689
Visit(binary.
Right
);
2700
Visit(binary.
Right
);
FlowAnalysis\NullableWalker.cs (17)
5171
var (rightOperand, rightConversion) = RemoveConversion(binary.
Right
, includeExplicitConversions: false);
5276
var (rightOperand, rightConversion) = RemoveConversion(binary.
Right
, includeExplicitConversions: false);
5300
if (IsConditionalState && binary.
Right
.ConstantValueOpt is { IsBoolean: true } rightConstant)
5304
Visit(binary.
Right
);
5305
UseRvalueOnly(binary.
Right
); // record result for the right
5314
Visit(binary.
Right
);
5315
UseRvalueOnly(binary.
Right
);
5342
var inferredResult = ReinferAndVisitBinaryOperator(binary, binary.OperatorKind, binary.BinaryOperatorMethod, binary.Type, binary.Left, leftOperand, leftConversion, leftType, binary.
Right
, rightOperand, rightConversion, rightType);
5546
var (rightOperand, rightConversion) = RemoveConversion(binary.
Right
, includeExplicitConversions: false);
5558
if (binary.
Right
.ConstantValueOpt?.IsNull == true)
5564
operandComparedToNull = binary.
Right
;
5583
operandComparedToNonNull = binary.
Right
;
12294
Visit(node.
Right
);
12297
AfterRightChildOfBinaryLogicalOperatorHasBeenVisited(node.
Right
, isAnd, isBool, ref leftTrue, ref leftFalse);
12314
var (rightOperand, rightConversion) = RemoveConversion(binary.
Right
, includeExplicitConversions: false);
12366
rightType = VisitBinaryOperatorOperandConversion(binary.
Right
, rightOperand, rightConversion, parameters[1], rightUnderlyingType, isLifted, out _);
12370
AfterRightChildOfBinaryLogicalOperatorHasBeenVisited(binary.
Right
, isAnd, isBool, ref leftTrue, ref leftFalse);
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
307
Visit(node.
Right
);
Generated\BoundNodes.xml.Generated.cs (8)
1668
if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.
Right
|| !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1759
if (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))
9955
this.Visit(node.
Right
);
9967
this.Visit(node.
Right
);
11085
BoundExpression right = (BoundExpression)this.Visit(node.
Right
);
11105
BoundExpression right = (BoundExpression)this.Visit(node.
Right
);
15469
new TreeDumperNode("right", null, new TreeDumperNode[] { Visit(node.
Right
, null) }),
15498
new TreeDumperNode("right", null, new TreeDumperNode[] { Visit(node.
Right
, null) }),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
196
return VisitBinaryOperator(binOp.OperatorKind, binOp.BinaryOperatorMethod, binOp.Type, binOp.Left, binOp.
Right
);
199
return VisitBinaryOperator(userDefCondLogOp.OperatorKind, userDefCondLogOp.LogicalOperator, userDefCondLogOp.Type, userDefCondLogOp.Left, userDefCondLogOp.
Right
);
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
708
Visit(current.
Right
);
Lowering\DiagnosticsPass_Warnings.cs (27)
269
CheckUnsafeType(node.
Right
);
272
CheckForBitwiseOrSignExtend(node, node.OperatorKind, node.Left, node.
Right
);
317
if (node.Left.ConstantValueOpt != null && node.
Right
.ConstantValueOpt == null && node.
Right
.Kind == BoundKind.Conversion)
319
CheckVacuousComparisons(node, node.Left.ConstantValueOpt, node.
Right
);
322
if (node.
Right
.ConstantValueOpt != null && node.Left.ConstantValueOpt == null && node.Left.Kind == BoundKind.Conversion)
324
CheckVacuousComparisons(node, node.
Right
.ConstantValueOpt, node.Left);
330
if (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))
335
else 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))
386
if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.
Right
))
768
if (node.
Right
.IsLiteralNull() && node.Left.NullableAlwaysHasValue())
772
else if (node.Left.IsLiteralNull() && node.
Right
.NullableAlwaysHasValue())
774
Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.
Right
.Type.GetNullableUnderlyingType(), node.
Right
.Type);
798
if (node.
Right
.NullableNeverHasValue())
800
Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.
Right
));
816
if (node.
Right
.NullableNeverHasValue() && node.Left.NullableAlwaysHasValue())
818
Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.
Right
));
820
else if (node.Left.NullableNeverHasValue() && node.
Right
.NullableAlwaysHasValue())
822
Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.
Right
.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Left));
828
if ((node.Left.NullableNeverHasValue() && node.
Right
.IsNullableNonBoolean()) ||
829
(node.Left.IsNullableNonBoolean() && node.
Right
.NullableNeverHasValue()))
834
if (node.
Right
.NullableNeverHasValue() || node.Left.NullableNeverHasValue())
845
if (node.
Right
.NullableNeverHasValue() || node.Left.NullableNeverHasValue())
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
76
BoundExpression loweredRight = VisitExpression(node.
Right
);
158
BoundExpression loweredRight = VisitExpression(original.
Right
);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
195
stack.Push(utf8Addition.
Right
);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (3)
238
if (shouldRecurse(binaryOperator.
Right
, out var right))
244
self.VisitAndAddConcatArgumentInReverseOrder(binaryOperator.
Right
, argumentAlreadyVisited: false, arguments, ref concatMethods);
601
var right = VisitExpression(current.
Right
);
Lowering\SpillSequenceSpiller.cs (1)
996
var right = VisitExpression(ref builder, node.
Right
);
Operations\CSharpOperationFactory.cs (2)
1470
IOperation right = Create(currentBinary.
Right
);
2432
var right = createContent(binaryOperator.
Right
);