1 write to Operand
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2952this.Operand = operand;
198 references to Operand
Microsoft.CodeAnalysis.CSharp (198)
Binder\Binder.ValueChecks.cs (10)
4057return CheckRefEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver, diagnostics); 4433return GetInterpolatedStringHandlerConversionEscapeScope(conversion.Operand, localScopeDepth); 4438return HasLocalScope((BoundCollectionExpression)conversion.Operand) ? 4471argsOpt: [conversion.Operand], 4478return GetValEscape(conversion.Operand, localScopeDepth); 5219return CheckInterpolatedStringHandlerConversionEscape(conversion.Operand, escapeFrom, escapeTo, diagnostics); 5224if (HasLocalScope((BoundCollectionExpression)conversion.Operand) && !SafeContext.CurrentMethod.IsConvertibleTo(escapeTo)) 5265argsOpt: [conversion.Operand], 5275return CheckValEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 5627return GetInlineArrayConversionEquivalentSignatureMethod(inlineArray: conversion.Operand, resultType: conversion.Type, out arguments, out refKinds);
Binder\Binder_Attributes.cs (1)
911var operand = node.Operand;
Binder\Binder_Conversions.cs (1)
1695else if (arg is BoundConversion { Operand: BoundCollectionExpression { Elements: [BoundExpression collectionElement] } })
Binder\Binder_Expressions.cs (4)
5142case BoundConversion { Conversion.IsIdentity: true, Operand: BoundParameter param }: 5967if (argument is BoundConversion { Conversion.IsInterpolatedStringHandler: true, Operand: var operand }) 7506leftSymbol = ((BoundConversion)boundValue).Operand.ExpressionSymbol; 9630else if (convertedIndex is BoundConversion { Operand: { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex } } operand })
Binder\Binder_Operators.cs (3)
73conversion = conversion.Update(conversion.Operand, conversion.Conversion, conversion.IsBaseConversion, conversion.Checked, 2769ConstantValue? leftConstant = leftConv.Operand.ConstantValueOpt; 2770ConstantValue? rightConstant = rightConv.Operand.ConstantValueOpt;
Binder\Binder_Patterns.cs (1)
690BoundExpression operand = conversion.Operand;
Binder\Binder_Query.cs (1)
681var l1 = c1 != null ? c1.Operand as BoundLambda : null;
Binder\ForEachLoopBinder.cs (1)
654if ((convertedCollectionExpression as BoundConversion)?.Operand != (object)collectionExpr)
Binder\RefSafetyAnalysis.cs (5)
704if (arg is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 706var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 980VisitDeconstructionArguments(variables, right.Syntax, right.Conversion, right.Operand); 1098return GetDeconstructionRightParts(conv.Operand); 1118inlineArray: 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; 3927return 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)
598return node.UpdateOperand(this.VisitExpression(node.Operand, context));
Compilation\CSharpSemanticModel.cs (5)
2117if (tupleLiteralConversion.Operand.Kind == BoundKind.ConvertedTupleLiteral) 2119var convertedTuple = (BoundConvertedTupleLiteral)tupleLiteralConversion.Operand; 2125(type, nullability) = getTypeAndNullability(tupleLiteralConversion.Operand); 2206else if (((BoundConversion)highestBoundExpr).Operand.Kind != BoundKind.Conversion) 4314else if (conversion.Operand is BoundConversion { ConversionKind: ConversionKind.MethodGroup } nestedMethodGroupConversion)
Compilation\MemberSemanticModel.cs (1)
1808node = ((BoundConversion)node).Operand;
FlowAnalysis\AbstractFlowPass.cs (6)
1746BoundExpression receiver = ((BoundMethodGroup)node.Operand).ReceiverOpt; 1748EnterRegionIfNeeded(node.Operand); 1750LeaveRegionIfNeeded(node.Operand); 1759Visit(node.Operand); 2663&& conv.Operand.Type!.IsNonNullableValueType()); 3008BoundConversion { Conversion: Conversion conversion, Operand: BoundConditionalAccess ca } when CanPropagateStateWhenNotNull(conversion) => ca,
FlowAnalysis\DefiniteAssignment.cs (2)
938return WriteConsideredUse(null, boundConversion.Operand); 2824NoteWrite(node.Operand, value: null, read: false, isRef: false);
FlowAnalysis\NullableWalker.cs (17)
2138var operand = conv.Operand; 2156IsTargetTypedExpression(conv.Operand) && 2157TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2165return MakeSlot(conv.Operand); 2593IsDefaultValue(conversion.Operand); 5609operand = ((BoundConversion)operand).Operand; 5808possiblyConversion = conversion.Operand; 7461elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 8556expr = conversion.Operand; 9982conversionOpt = conversionOpt.Operand as BoundConversion; 10002conversionOpt = conversionOpt.Operand as BoundConversion; 10634VisitRvalue(right.Operand); 10638VisitDeconstructionArguments(variables, right.Conversion, right.Operand, rightResultOpt); 10914return GetDeconstructionRightParts(conv.Operand, null); 11707if (!reportedDiagnostic && !(collectionExpression is BoundConversion { Operand: { IsSuppressed: true } })) 11795if (node.Expression is not BoundConversion { Operand.IsSuppressed: true } && 11832isSuppressed: node.Expression is BoundConversion { Operand.IsSuppressed: true },
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
398Visit(node.Operand.GetInterpolatedStringHandlerData().Construction); 403this.Visit(node.Operand);
Generated\BoundNodes.xml.Generated.cs (5)
2975if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10069this.Visit(node.Operand); 11306BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 13420BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 15779new TreeDumperNode("operand", null, new TreeDumperNode[] { Visit(node.Operand, null) }),
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (1)
163(BoundExpression)Visit(node.Operand),
Lowering\ClosureConversion\ClosureConversion.cs (1)
1400var 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)
844CheckUnsafeType(node.Operand); 851CheckMethodGroup((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)
725return conversion.Operand.ConstantValueOpt;
Lowering\LocalRewriter\LocalRewriter_Call.cs (5)
611current = conv.Operand; 852if (argument is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 856var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 925if (argument is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 927var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData();
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (4)
1352if (convertedExpression.Operand.Type is ArrayTypeSymbol arrayType) 1358convertedExpression.Operand, 1371convertedExpression.Operand, 1389convertedExpression.Operand,
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
969ReadIsSideeffecting(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); 1009case BoundConversion { Conversion: { Kind: ConversionKind.ImplicitNullable }, Operand: var convertedArgument } 1014case 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)
152BoundExpression rewrittenExpression = VisitExpression(convertedCollection.Operand); 1216return 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 (3)
222not (BoundCall or BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand.Type.SpecialType: SpecialType.System_Char }) 286if (argument is BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand: { Type.SpecialType: SpecialType.System_Char } operand }) 585expr = 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)
762expression = conversion.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)
1088return conversion is { Conversion.IsObjectCreation: true, Operand: BoundObjectCreationExpression { WasTargetTyped: true } operand } &&