1 write to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
2963
this.
ExplicitCastInCode
= explicitCastInCode;
41 references to ExplicitCastInCode
Microsoft.CodeAnalysis.CSharp (41)
Binder\RefSafetyAnalysis.cs (1)
1079
inlineArray: node.Expression is not BoundConversion { Conversion.IsIdentity: true,
ExplicitCastInCode
: false, Operand: BoundExpression operand } ? node.Expression : operand,
BoundTree\BoundExpression.cs (1)
480
return this.Update(operand: operand, this.Conversion, this.IsBaseConversion, this.Checked, this.
ExplicitCastInCode
, this.ConstantValueOpt, this.ConversionGroupOpt, this.OriginalUserDefinedConversionsOpt, this.Type);
CodeGen\EmitConversion.cs (1)
190
if (conversion.
ExplicitCastInCode
)
FlowAnalysis\NullableWalker.cs (3)
5699
if ((node.RightOperand as BoundConversion)?.
ExplicitCastInCode
!= false &&
8118
Debug.Assert(group != null || !conversion.
ExplicitCastInCode
); // Explicit conversions should include a group.
9523
fromExplicitCast: conversionOpt?.
ExplicitCastInCode
?? false,
Generated\BoundNodes.xml.Generated.cs (5)
2984
if (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))
11279
return node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.
ExplicitCastInCode
, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, type);
13310
updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.
ExplicitCastInCode
, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, infoAndType.Type!);
13315
updatedNode = node.Update(operand, node.Conversion, node.IsBaseConversion, node.Checked, node.
ExplicitCastInCode
, node.ConstantValueOpt, node.ConversionGroupOpt, node.OriginalUserDefinedConversionsOpt, node.Type);
15666
new TreeDumperNode("explicitCastInCode", node.
ExplicitCastInCode
, null),
Lowering\ClosureConversion\ClosureConversion.cs (1)
1399
if (_inExpressionLambda && conversion.
ExplicitCastInCode
)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
670
if (conversion != null && !conversion.
ExplicitCastInCode
)
722
return node.
ExplicitCastInCode
? Convert(operand, node.Type, false) : operand;
727
return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.
ExplicitCastInCode
);
738
return Convert(Constant(_bound.Null(_objectType)), _objectType, node.Type, false, node.
ExplicitCastInCode
);
740
return Convert(Visit(node.Operand), node.Operand.Type, node.Type, node.Checked, node.
ExplicitCastInCode
);
Lowering\DiagnosticsPass_Warnings.cs (5)
144
if (conversion.
ExplicitCastInCode
) break;
347
return node.Kind == BoundKind.Conversion && ((BoundConversion)node).
ExplicitCastInCode
;
355
if (conv.
ExplicitCastInCode
) return false;
442
if (conversion.
ExplicitCastInCode
)
688
if (conv.
ExplicitCastInCode
&& toSpecialType.IsSignedIntegralType())
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
843
Debug.Assert(!((BoundConversion)argument).
ExplicitCastInCode
);
914
Debug.Assert(!((BoundConversion)argument).
ExplicitCastInCode
);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
79
var result = MakeConversionNode(node, node.Syntax, rewrittenOperand, node.Conversion, node.Checked, node.
ExplicitCastInCode
, node.ConstantValueOpt, rewrittenType);
252
return conversion.ConversionKind == ConversionKind.Identity && !conversion.
ExplicitCastInCode
;
1021
explicitCastInCode: conversion.
ExplicitCastInCode
,
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
240
if (arg is BoundConversion { Conversion: { Kind: ConversionKind.InterpolatedStringHandler },
ExplicitCastInCode
: false, Operand: var operand })
251
Debug.Assert(arguments.All(arg => arg is not BoundConversion { Conversion: { IsInterpolatedStringHandler: true },
ExplicitCastInCode
: false }));
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
75
explicitCastInCode: conversion.
ExplicitCastInCode
,
121
syntax, fieldAccess, elementConversions[i], boundConversion.Checked, boundConversion.
ExplicitCastInCode
, null, null, destElementTypes[i].Type, boundConversion.HasErrors);
196
case BoundConversion { Conversion: { IsUserDefined: true } } conv when conv.
ExplicitCastInCode
|| enclosingConversionWasExplicit:
202
var deferredOperand = DeferSideEffectingArgumentToTempForTupleEquality(conv.Operand, effects, temps, conv.
ExplicitCastInCode
|| enclosingConversionWasExplicit);
475
expr.Syntax, expr, conversion, enclosing.Checked, enclosing.
ExplicitCastInCode
,
611
conversion: conv.Conversion, @checked: conv.Checked, explicitCastInCode: conv.
ExplicitCastInCode
,
Lowering\MethodToClassRewriter.cs (1)
305
node.
ExplicitCastInCode
,
Operations\CSharpOperationFactory.cs (5)
1018
bool isImplicit = boundConversion.WasCompilerGenerated || !boundConversion.
ExplicitCastInCode
|| forceOperandImplicitLiteral;
1096
if (boundConversion.
ExplicitCastInCode
&& conversion.IsIdentity && boundOperand.Kind == BoundKind.Conversion)
1101
if (nestedConversion.Syntax == nestedOperand.Syntax && nestedConversion.
ExplicitCastInCode
&&
1978
boundForEachStatement.Expression is not BoundConversion { Conversion.IsIdentity: true,
ExplicitCastInCode
: false, Operand: BoundExpression operand } ?
2424
var isImplicit = conversion.WasCompilerGenerated || !conversion.
ExplicitCastInCode
;