1 write to Operand
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2958this.Operand = operand;
193 references to Operand
Microsoft.CodeAnalysis.CSharp (193)
Binder\Binder.ValueChecks.cs (10)
3936return CheckRefEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver, diagnostics); 4313return GetInterpolatedStringHandlerConversionEscapeScope(conversion.Operand, scopeOfTheContainingExpression); 4318return HasLocalScope((BoundCollectionExpression)conversion.Operand) ? 4351argsOpt: [conversion.Operand], 4358return GetValEscape(conversion.Operand, scopeOfTheContainingExpression); 5084return CheckInterpolatedStringHandlerConversionEscape(conversion.Operand, escapeFrom, escapeTo, diagnostics); 5089if (HasLocalScope((BoundCollectionExpression)conversion.Operand) && escapeTo < CurrentMethodScope) 5130argsOpt: [conversion.Operand], 5140return CheckValEscape(node, conversion.Operand, escapeFrom, escapeTo, checkingReceiver: false, diagnostics: diagnostics); 5485return 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)
5048case BoundConversion { Conversion.IsIdentity: true, Operand: BoundParameter param }: 5815if (argument is BoundConversion { Conversion.IsInterpolatedStringHandler: true, Operand: var operand }) 7356leftSymbol = ((BoundConversion)boundValue).Operand.ExpressionSymbol; 9145else 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)
649if (arg is BoundConversion { ConversionKind: ConversionKind.InterpolatedStringHandler, Operand: BoundInterpolatedString or BoundBinaryOperator } conversion) 651var interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 924VisitDeconstructionArguments(variables, right.Syntax, right.Conversion, right.Operand); 1042return GetDeconstructionRightParts(conv.Operand); 1062inlineArray: node.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? node.Expression : operand,
BoundTree\BoundNode.cs (8)
344BoundConversion { Operand: BoundCollectionExpression { IsParamsArrayOrCollection: true } }); 431if ((object)boundConversion.Operand == placeholder) 438boundConversion = (BoundConversion)boundConversion.Operand; 445if ((object)boundConversion.Operand == placeholder || 446(object)(next = (BoundConversion)boundConversion.Operand).Operand == placeholder || 447(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)
1682BoundExpression receiver = ((BoundMethodGroup)node.Operand).ReceiverOpt; 1684EnterRegionIfNeeded(node.Operand); 1686LeaveRegionIfNeeded(node.Operand); 1695Visit(node.Operand); 2542&& conv.Operand.Type!.IsNonNullableValueType()); 2887BoundConversion { Conversion: Conversion conversion, Operand: BoundConditionalAccess ca } when CanPropagateStateWhenNotNull(conversion) => ca,
FlowAnalysis\DefiniteAssignment.cs (2)
935return WriteConsideredUse(null, boundConversion.Operand); 2778NoteWrite(node.Operand, value: null, read: false);
FlowAnalysis\NullableWalker.cs (16)
2027var operand = conv.Operand; 2045IsTargetTypedExpression(conv.Operand) && 2046TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2054return MakeSlot(conv.Operand); 2458IsDefaultValue(conversion.Operand); 5219operand = ((BoundConversion)operand).Operand; 5418possiblyConversion = conversion.Operand; 6901elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 7908expr = conversion.Operand; 9321conversionOpt = conversionOpt.Operand as BoundConversion; 9341conversionOpt = conversionOpt.Operand as BoundConversion; 9959VisitRvalue(right.Operand); 9963VisitDeconstructionArguments(variables, right.Conversion, right.Operand, rightResultOpt); 10236return GetDeconstructionRightParts(conv.Operand, null); 10832if (!reportedDiagnostic && !(node.Expression is BoundConversion { Operand: { IsSuppressed: true } })) 10920if (node.Expression is not BoundConversion { Operand.IsSuppressed: true } &&
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
323Visit(node.Operand.GetInterpolatedStringHandlerData().Construction); 328this.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)) 10039this.Visit(node.Operand); 11238BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 13266BoundExpression operand = (BoundExpression)this.Visit(node.Operand); 15623new 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)
475operand = conversion.Operand; 605conversion.Operand, 624var mg = (BoundMethodGroup)node.Operand; 632var operandType = node.Operand.Type; 641? Convert(Visit(node.Operand), node.Operand.Type, method.Parameters[0].Type, node.Checked, false) 642: Visit(node.Operand); 652var operand = Visit(node.Operand); 656if (node.Operand.Type.IsNullableType()) 658return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode); 665var e1 = Convert(Visit(node.Operand), node.Operand.Type, intermediate, node.Checked, false); 671return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.ExplicitCastInCode);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
762CheckUnsafeType(node.Operand); 769CheckMethodGroup((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)
1301if (convertedExpression.Operand.Type is ArrayTypeSymbol arrayType) 1307convertedExpression.Operand, 1320convertedExpression.Operand, 1338convertedExpression.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); 910case BoundConversion { Conversion: { Kind: ConversionKind.ImplicitNullable }, Operand: var convertedArgument } 915case 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); 1231return 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)
21MakeInterpolatedStringFormat((BoundInterpolatedString)conversion.Operand, out format, out expressions); 389if (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); 1949boundForEachStatement.Expression is not BoundConversion { Conversion.IsIdentity: true, ExplicitCastInCode: false, Operand: BoundExpression operand } ? 2320BoundConversion { Operand: BoundLiteral } c => CreateBoundConversionOperation(c, forceOperandImplicitLiteral: true), 2386InterpolatedStringHandlerData interpolationData = conversion.Operand.GetInterpolatedStringHandlerData(); 2388var 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 } &&