1 write to Operand
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2958this.Operand = operand;
194 references to Operand
Microsoft.CodeAnalysis.CSharp (194)
Binder\Binder.ValueChecks.cs (10)
3973return CheckRefEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver, diagnostics); 4350return GetInterpolatedStringHandlerConversionEscapeScope(conversion.Operand, scopeOfTheContainingExpression); 4355return HasLocalScope((BoundCollectionExpression)conversion.Operand) ? 4388argsOpt: [conversion.Operand], 4395return GetValEscape(conversion.Operand, scopeOfTheContainingExpression); 5121return CheckInterpolatedStringHandlerConversionEscape(conversion.Operand, escapeFrom, escapeTo, diagnostics); 5126if (HasLocalScope((BoundCollectionExpression)conversion.Operand) && escapeTo < CurrentMethodScope) 5167argsOpt: [conversion.Operand], 5177return CheckValEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 5522return GetInlineArrayConversionEquivalentSignatureMethod(inlineArray: conversion.Operand, resultType: conversion.Type, out arguments, out refKinds);
Binder\Binder_Attributes.cs (1)
911var operand = node.Operand;
Binder\Binder_Expressions.cs (4)
5086case BoundConversion { Conversion.IsIdentity: true, Operand: BoundParameter param }: 5911if (argument is BoundConversion { Conversion.IsInterpolatedStringHandler: true, Operand: var operand }) 7452leftSymbol = ((BoundConversion)boundValue).Operand.ExpressionSymbol; 9241else if (convertedIndex is BoundConversion { Operand: { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex } } operand })
Binder\Binder_Operators.cs (3)
68conversion = conversion.Update(conversion.Operand, conversion.Conversion, conversion.IsBaseConversion, conversion.Checked, 1950ConstantValue? leftConstant = leftConv.Operand.ConstantValueOpt; 1951ConstantValue? rightConstant = rightConv.Operand.ConstantValueOpt;
Binder\Binder_Patterns.cs (1)
689BoundExpression operand = conversion.Operand;
Binder\Binder_Query.cs (1)
681var l1 = c1 != null ? c1.Operand as BoundLambda : null;
Binder\ForEachLoopBinder.cs (1)
639if ((convertedCollectionExpression as BoundConversion)?.Operand != (object)collectionExpr)
Binder\RefSafetyAnalysis.cs (5)
640if (arg is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 642var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 916VisitDeconstructionArguments(variables, right.Syntax, right.Conversion, right.Operand); 1034return GetDeconstructionRightParts(conv.Operand); 1054inlineArray: node.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? node.Expression : operand,
BoundTree\BoundNode.cs (8)
365BoundConversion { Operand: BoundCollectionExpression { IsParamsArrayOrCollection: true } }); 452if ((object)boundConversion.Operand == placeholder) 459boundConversion = (BoundConversion)boundConversion.Operand; 466if ((object)boundConversion.Operand == placeholder || 467(object)(next = (BoundConversion)boundConversion.Operand).Operand == placeholder || 468(object)((BoundConversion)next.Operand).Operand == placeholder)
BoundTree\BoundNode_Source.cs (1)
323appendSource(conversion.Operand);
CodeGen\EmitConversion.cs (12)
54var operand = conversion.Operand; 139var fromType = conversion.Operand.Type; 160(fromPredefTypeKind == Cci.PrimitiveTypeCode.IntPtr && conversion.Operand is BoundBinaryOperator { OperatorKind: BinaryOperatorKind.Division })); // pointer subtraction: see LocalRewriter.RewritePointerSubtraction() 203if (conversion.Operand.ConstantValueOpt == null) 214var fromType = conversion.Operand.Type; 230if (!conversion.Operand.Type.IsVerifierReference()) 232EmitBox(conversion.Operand.Type, conversion.Operand.Syntax); 262if (!conversion.Operand.Type.IsVerifierReference()) 264EmitBox(conversion.Operand.Type, conversion.Operand.Syntax); 290var fromType = conversion.Operand.Type;
CodeGen\EmitExpression.cs (4)
1236EmitExpression(conversion.Operand, true); 1551return CanUseCallOnRefTypeReceiver(conversion.Operand); 2174current = conv.Operand; 3928return StackMergeType(conversion.Operand);
CodeGen\EmitOperators.cs (1)
375if (comparand is BoundConversion { Type.SpecialType: SpecialType.System_Object, ConversionKind: ConversionKind.Boxing, Operand.Type: TypeParameterSymbol { AllowsRefLikeType: true } } &&
CodeGen\Optimizer.cs (1)
599return node.UpdateOperand(this.VisitExpression(node.Operand, context));
Compilation\CSharpSemanticModel.cs (4)
2106if (tupleLiteralConversion.Operand.Kind == BoundKind.ConvertedTupleLiteral) 2108var convertedTuple = (BoundConvertedTupleLiteral)tupleLiteralConversion.Operand; 2114(type, nullability) = getTypeAndNullability(tupleLiteralConversion.Operand); 2195else if (((BoundConversion)highestBoundExpr).Operand.Kind != BoundKind.Conversion)
Compilation\MemberSemanticModel.cs (1)
1807node = ((BoundConversion)node).Operand;
FlowAnalysis\AbstractFlowPass.cs (6)
1740BoundExpression receiver = ((BoundMethodGroup)node.Operand).ReceiverOpt; 1742EnterRegionIfNeeded(node.Operand); 1744LeaveRegionIfNeeded(node.Operand); 1753Visit(node.Operand); 2632&& conv.Operand.Type!.IsNonNullableValueType()); 2977BoundConversion { Conversion: Conversion conversion, Operand: BoundConditionalAccess ca } when CanPropagateStateWhenNotNull(conversion) => ca,
FlowAnalysis\DefiniteAssignment.cs (2)
937return WriteConsideredUse(null, boundConversion.Operand); 2811NoteWrite(node.Operand, value: null, read: false, isRef: false);
FlowAnalysis\NullableWalker.cs (17)
2040var operand = conv.Operand; 2058IsTargetTypedExpression(conv.Operand) && 2059TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2067return MakeSlot(conv.Operand); 2495IsDefaultValue(conversion.Operand); 5335operand = ((BoundConversion)operand).Operand; 5534possiblyConversion = conversion.Operand; 7017elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 8065expr = conversion.Operand; 9490conversionOpt = conversionOpt.Operand as BoundConversion; 9510conversionOpt = conversionOpt.Operand as BoundConversion; 10116VisitRvalue(right.Operand); 10120VisitDeconstructionArguments(variables, right.Conversion, right.Operand, rightResultOpt); 10393return GetDeconstructionRightParts(conv.Operand, null); 11018if (!reportedDiagnostic && !(collectionExpression is BoundConversion { Operand: { IsSuppressed: true } })) 11106if (node.Expression is not BoundConversion { Operand.IsSuppressed: true } && 11143isSuppressed: node.Expression is BoundConversion { Operand.IsSuppressed: true },
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
399Visit(node.Operand.GetInterpolatedStringHandlerData().Construction); 404this.Visit(node.Operand);
Generated\BoundNodes.xml.Generated.cs (5)
2983if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || originalUserDefinedConversionsOpt != this.OriginalUserDefinedConversionsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10041this.Visit(node.Operand); 11240BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 13268BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 15625new TreeDumperNode("operand", null, new TreeDumperNode[] { Visit(node.Operand, null) }),
Lowering\ClosureConversion\ClosureConversion.cs (1)
1397var result = (BoundExpression)RewriteLambdaConversion((BoundLambda)conversion.Operand);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (15)
541operand = conversion.Operand; 673conversion.Operand, 692var mg = (BoundMethodGroup)node.Operand; 700var operandType = node.Operand.Type; 709? Convert(Visit(node.Operand), node.Operand.Type, method.Parameters[0].Type, node.Checked, false) 710: Visit(node.Operand); 721var operand = Visit(node.Operand); 725if (node.Operand.Type.IsNullableType()) 727return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode); 734var e1 = Convert(Visit(node.Operand), node.Operand.Type, intermediate, node.Checked, false); 740return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
784CheckUnsafeType(node.Operand); 791CheckMethodGroup((BoundMethodGroup)node.Operand, node.Conversion.Method, node.IsExtensionMethod, parentIsConversion: true, node.Type);
Lowering\DiagnosticsPass_Warnings.cs (12)
145receiver = conversion.Operand; 172current = conversion.Operand; 356NamedTypeSymbol nt = conv.Operand.Type as NamedTypeSymbol; 433conversion = conversion.Operand as BoundConversion) 447if (!conversion.Operand.Type.SpecialType.IsIntegralType() || !conversion.Type.SpecialType.IsIntegralType()) 452if (!Binder.CheckConstantBounds(conversion.Operand.Type.SpecialType, constantValue, out _)) 454Error(ErrorCode.WRN_VacuousIntegralComp, tree, conversion.Operand.Type); 582operand = conv.Operand; 612TypeSymbol from = conv.Operand.Type; 650ulong recursive = FindSurprisingSignExtensionBits(conv.Operand); 870type = GetTypeForLiftedComparisonWarning(conv.Operand); 897right = conversion.Operand;
Lowering\Extensions.cs (3)
65return conversion.Operand.NullableAlwaysHasValue(); 69return conversion.Operand.NullableAlwaysHasValue(); 119return conversion.Operand.NullableNeverHasValue();
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
718return conversion.Operand.ConstantValueOpt;
Lowering\LocalRewriter\LocalRewriter_Call.cs (5)
595current = conv.Operand; 836if (argument is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 840var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 909if (argument is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 911var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData();
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (4)
1308if (convertedExpression.Operand.Type is ArrayTypeSymbol arrayType) 1314convertedExpression.Operand, 1327convertedExpression.Operand, 1345convertedExpression.Operand,
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
897ReadIsSideeffecting(conv.Operand);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (16)
27var (data, parts) = node.Operand switch 31_ => throw ExceptionUtilities.UnexpectedValue(node.Operand.Kind) 34InterpolationHandlerResult interpolationResult = RewriteToInterpolatedStringHandlerPattern(data, parts, node.Operand.Syntax); 39Debug.Assert(node.Operand is BoundConvertedSwitchExpression { WasTargetTyped: true }); 40return Visit(node.Operand)!; 43Debug.Assert(node.Operand is BoundConditionalOperator { WasTargetTyped: true }); 44return Visit(node.Operand)!; 47Debug.Assert(node.Operand is not null); 48var objectCreation = VisitExpression(node.Operand); 52Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true }); 56Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true } or 62var rewrittenCollection = RewriteCollectionExpressionConversion(node.Conversion.UnderlyingConversions[0], (BoundCollectionExpression)node.Operand); 66return RewriteCollectionExpressionConversion(node.Conversion, (BoundCollectionExpression)node.Operand); 75var rewrittenOperand = VisitExpression(node.Operand); 1007case BoundConversion { Conversion: { Kind: ConversionKind.ImplicitNullable }, Operand: var convertedArgument } 1012case BoundConversion { Conversion: { Kind: ConversionKind.ImplicitNullable, UnderlyingConversions: var underlying }, Operand: var convertedArgument } conversion
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (5)
22return RewriteDeconstruction(node.Left, right.Conversion, right.Operand, node.IsUsed); 114Debug.Assert(right is not ({ Kind: BoundKind.TupleLiteral } or BoundConversion { Operand.Kind: BoundKind.TupleLiteral })); 117right is { Kind: BoundKind.ConvertedTupleLiteral } or BoundConversion { Operand.Kind: BoundKind.ConvertedTupleLiteral } 308&& IsTupleExpression(tupleConversion.Operand.Kind)) 310return ((BoundTupleExpression)tupleConversion.Operand).Arguments;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (2)
151BoundExpression rewrittenExpression = VisitExpression(convertedCollection.Operand); 1229return boundConversion.Operand;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
722else if (unloweredExpr is BoundConversion { Operand: { Type: { SpecialType: SpecialType.System_Int32 } } operand })
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
229expression = boundConversion.Operand;
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
620expr = conv.Operand;
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
19var interpolatedString = (BoundInterpolatedString)conversion.Operand; 240if (arg is BoundConversion { Conversion: { Kind: ConversionKind.InterpolatedStringHandler }, ExplicitCastInCode: false, Operand: var operand })
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (13)
49case BoundConversion { Conversion: { Kind: ConversionKind.Identity }, Operand: var o }: 51case BoundConversion { Conversion: { Kind: ConversionKind.ImplicitTupleLiteral }, Operand: var o }: 56case BoundConversion { Conversion: { Kind: var kind } c, Operand: var o } conversion when 88case BoundConversion { Conversion: { Kind: var kind }, Operand: var o } when 110Debug.Assert(boundConversion.Operand.Type is { }); 111var srcElementFields = boundConversion.Operand.Type.TupleElements; 113var savedTuple = DeferSideEffectingArgumentToTempForTupleEquality(LowerConversions(boundConversion.Operand), initEffects, temps); 202var deferredOperand = DeferSideEffectingArgumentToTempForTupleEquality(conv.Operand, effects, temps, conv.ExplicitCastInCode || enclosingConversionWasExplicit); 401case BoundConversion { Conversion: { IsIdentity: true }, Operand: var o }: 403case BoundConversion { Conversion: { IsNullable: true, UnderlyingConversions: var underlying } conversion, Operand: var o } 435case BoundConversion { Conversion: { IsIdentity: true }, Operand: var o }: 437case BoundConversion { Conversion: { IsNullable: true, UnderlyingConversions: var nested }, Operand: var o } conv when 610oldNodeOpt: conv, syntax: conv.Syntax, rewrittenOperand: LowerConversions(conv.Operand),
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
615expression = conversion.Operand;
Lowering\MethodToClassRewriter.cs (1)
301(BoundExpression)Visit(node.Operand),
Lowering\SpillSequenceSpiller.cs (1)
1183var operand = VisitExpression(ref builder, node.Operand);
Operations\CSharpOperationFactory.cs (11)
433IOperation value = Create(boundDeconstructionAssignmentOperator.Right.Operand); 1017Debug.Assert(!forceOperandImplicitLiteral || boundConversion.Operand is BoundLiteral); 1019BoundExpression boundOperand = boundConversion.Operand; 1038CreateBoundMethodGroupSingleMethodOperation((BoundMethodGroup)boundConversion.Operand, boundConversion.SymbolOpt, suppressVirtualCalls: false), 1099BoundExpression nestedOperand = nestedConversion.Operand; 1132? CreateBoundLiteralOperation((BoundLiteral)correctedConversionNode.Operand, @implicit: true) 1133: Create(correctedConversionNode.Operand); 1978boundForEachStatement.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? 2355BoundConversion { Operand: BoundLiteral } c => CreateBoundConversionOperation(c, forceOperandImplicitLiteral: true), 2421InterpolatedStringHandlerData interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 2423var content = createContent(conversion.Operand);
Operations\CSharpOperationFactory_Methods.cs (3)
39IOperation value = Create(expression is BoundConversion { IsParamsArrayOrCollection: true } conversion ? conversion.Operand : expression); 151return CreateBoundMethodGroupSingleMethodOperation((BoundMethodGroup)boundConversion.Operand, 157return Create(boundConversion.Operand);
Symbols\ConstantValueUtils.cs (1)
101unconvertedBoundValue = conversion.Operand;
Symbols\Source\ParameterHelpers.cs (1)
893return conversion is { Conversion.IsObjectCreation: true, Operand: BoundObjectCreationExpression { WasTargetTyped: true } operand } &&